kwpar_regdevno Kernel Service
Purpose
Registers a virtual device number for a given workload partition (WPAR) by mapping it to a real device number in the device switch table.
Syntax
Parameters
| Item | Description |
|---|---|
| wparid | WPAR ID. This parameter is required. |
| vdevno | Virtual device number. This parameter is required. |
| rdevno | Points to the data area that will contains the real device number. This parameter is passed by reference. This parameter is required. |
Description
The kwpar_regdevno kernel service provides the ability to register a virtual device number for a given WPAR by mapping it to a real device number in the device switch table. The kwpar_regdevno kernel service performs the following steps:
- Locates a free slot in the kernel device switch table and reserves it for the WPAR specified by the wparid parameter.
- Creates a mapping between the virtual device number, which is specified by the vdevno parameter, to the real device number reserved in the previous step.
- The newly reserved real device number is passed back to the caller through the rdevno parameter.
Execution Environment
The kwpar_regdevno kernel service can be called from the process environment only.
Return Values
| Item | Description |
|---|---|
| 0 | Success. |
| non-zero | Failure. |
Error Codes
The kwpar_regdevno kernel 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. |
| ENOTEMPTY | The virtual device number vdevno is already mapped. |