kwpar_getname Kernel Service

Purpose

Returns the workload partition name associated with the requested ID.

Syntax

#include<sys/wparid.h>
#include<sys/xmem.h>

int kwpar_getname(kcid, buffer, length, adspace)
cid_t kcid;
char * buffer; 
size_t length; 
int adspace;  

Description

Get the name associated with the workload partition ID (kcid) and write it to the output buffer. The maximum number of bytes to write is limited by the length parameter. The length parameter cannot exceed MAXCORRALNAMELEN. The service writes to either user space or kernel space, depending on the value specified for the adspace parameter.

Parameters

Item Description
kcid Specifies the workload partition ID.
buffer Points to the buffer where the workload partition name is stored.
length Specifies the maximum number of bytes to return.
adspace Indicates in which part of memory the buffer parameter is located:
SYS_ADSPACE
Indicates that the buffer parameter is in the kernel memory.
USER_ADSPACE
Indicates that the buffer parameter is in the application memory.

Execution Environment

Process environment only.

Return Values

Item Description
0 The command completed successfully.
EINVAL Invalid WPAR ID or specified length is greater than MAXCORRALNAMELEN.
EFAULT Error during copyout to user space.