getosuuid Subroutine
Purpose
Retrieves the operating system Universal Unique Identifier (UUID).
Library
Standard C Library (libc.a)
Syntax
Description
Retrieves the operating system UUID saved in the AIX® kernel. If in a WPAR, the WPAR UUID is returned instead.
Note:
The UUID of the AIX operating system can be retrieved using the lsattr command:
lsattr -l sys0 -a os_uuid -E
Parameters
Item | Description |
---|---|
uuid | Points to the location used to return the operating system UUID. |
uuid_type | Specifies the type of UUID to retrieve. Must be GETOSUUID_AIX. |
Return Values
Upon successful completion the getosuuid subroutine returns a value of 0. Otherwise, a value of -1 is returned and the errno global variable is set to indicate the error.
Error Codes
Item | Description |
---|---|
EINVAL | Indicates the value of the uuid_type parameter is invalid. |
EFAULT | Invalid address in parameter uuid. |