kwpar_v2rmap_devno Kernel Service

Purpose

Maps a virtual device number to the corresponding real device number in the device switch table for a given workload partition (WPAR).

Syntax

#include <sys/wparid.h>

int kwpar_v2rmap_devno ( wparid, vdevno, rdevno)
cid_t wparid;
dev_t vdevno;
dev_t * rdevno;

Parameters

Item Description
wparid WPAR identifier. This parameter is required.
vdevno Virtual device number. This parameter is required.
rdevno Points to the data area that will contain the real device number. This parameter is passed by reference. This parameter is optional.

Description

The kwpar_v2rmap_devno kernel service provides the ability to translate a virtual device number maintained in user space to the corresponding real device number maintained in the kernel device switch table. The caller must specify an existing WPAR identifier with the wparid parameter and a valid virtual device number with the vdevno parameter. The kwpar_v2rmap_devno kernel service will write the corresponding real device number to the data area pointed to by the rdevno parameter if it is specified. If the rdevno parameter is not specified, the return code will indicate whether a mapping exists for the given WPAR identifier and virtual device number.

A mapping for the specified virtual device number must exist for the kwpar_v2rmap_devno kernel service to succeed.

Execution Environment

The kwpar_v2rmap_devno kernel service can be called from the process environment only.

Return Values

Item Description
0 Success.
non-zero Failure.

Error Codes

The kwpar_v2rmap_devno service fails if one or more of the following errors occur:

Item Description
EINVAL Either the wparid or vdevno argument is not valid.
ENXIO Unable to locate the WPAR device map associated with the given WPAR id.
ENODEV Unable to locate the mapping for the given virtual device number.