setosuuid Subroutine

Purpose

Sets the operating system Universal Unique Identifier (UUID).

Library

Standard C Library (libc.a)

Syntax

#include <uuid.h>
int setosuuid (uuid)
uuid_t * uuid;

Description

The setosuuid subroutine saves the UUID pointed to by the uuid parameter as the operating system UUID in the AIX® kernel. This subroutine can only be run with the root privileges.

Note:

The UUID of the AIX operating system can be reset to a new system generated UUID using the chdev command. Setting the UUID to an empty string will cause the system to generate a new UUID:

chdev -l sys0 -a os_uuid="" 

The UUID of the AIX operating system can be reset to a specific UUID using the chdev command:

chdev -l sys0 -a os_uuid="<uuid_string>" 

If the chdev command is used to reset the UUID to an invalid UUID, the system will disregard this UUID and generate a new one.

Parameters

Item Description
uuid Specifies the UUID to be saved as the operating system UUID.

Return Values

Upon successful completion the setosuuid 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
EPERM The process does not have the appropriate privileges.
EFAULT The address in parameter uuid is invalid.