HP-UX 11i Version 1.5 Release Notes, May 2001

Table Of Contents
Programming
Changes to libc
Chapter 7100
Changes to confstr()
HP-UX 11i Version 1.5 (B.11.20) includes an enhanced version of
confstr() that defines three new parameter values.
_CS_MACHINE_IDENT
ID number for each physical machine. Returned as an
opaque string of printable ascii characters not to
exceed 64 bytes including the string terminator. This
string has the same value for all partitions in a
physical machine. For hardware classes first released
with HP-UX 11i Version 1.5 (B.11.20) or later this ID
number is unique across all hardware classes. For
earlier hardware classes the ID number is unique only
within the hardware class. A null string is returned if
no ID number is available (expected to be the case only
for prototype machines or others improperly configured
in manufacturing).
_CS_PARTITION_IDENT
ID number for each partition existing on a machine.
Returned as an opaque string of printable ascii
characters not to exceed 64 bytes including the string
terminator. For any machine not supporting partitions
this value will be the same as _CS_MACHINE_IDENT.
_CS_MACHINE_SERIAL
machine serial number as found labeled on the
external machine chassis. The value will be a printable
ascii string not to exceed 64 bytes including the string
terminator. This string is not available on all classes of
machines; if unavailable, the string will be empty. This
string is not a unique identifier of the machine, since
machines of different classes can have the same serial
number. If a unique identifier is needed, use
_CS_MACHINE_IDENT or _CS_PARTITION_IDENT.
The preferred method of calling these functions is defined in the confstr
(3C) manpage as:
bufsize=confstr(_CS_MACHINE_IDENT,NULL,(size_t)0);
buffer=(char *)malloc(bufsize+1);
confstr(_CS_MACHINE_IDENT,buffer,bufsize+1);