kwpar_r2vmap_devno Kernel Service

Purpose

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

Syntax

#include <sys/wparid.h>

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

Parameters

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

Description

The kwpar_r2vmap_devno kernel service provides the ability to translate a real device number, maintained in the kernel device switch table, to the corresponding virtual device number maintained in the user space. The caller must specify an existing WPAR identifier with the wparid parameter and a valid real device number with the rdevno parameter. The kwpar_r2vmap_devno kernel service writes the corresponding virtual device number to the data area pointed to by the vdevno parameter (if specified). If the vdevno parameter is not specified, the return code indicates whether a mapping exists for the given WPAR identifier and real 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_r2vmap_devno kernel service can be called from the process environment only.

Return Values

Item Description
0 Success.
non-zero Failure.

Error Codes

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

Item Description
EINVAL Either the wparid or rdevno argument is invalid.
ENXIO Unable to locate the WPAR device map associated with the given WPAR ID.
ESRCH Unable to locate a mapping for the given real device number rdevno.