HP-UX 11i March 2002 Release Notes
Programming Miscellaneous
Chapter 13
228
this is expected to be the case only for prototype machines or other
systems improperly configured in manufacturing.
_CS_PARTITION_IDENT
Identifier for each partition existing on a machine. Returned as an
opaque string of printable ascii characters. For any machine not
supporting partitions this value will be 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. 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
the following:
bufsize=confstr(_CS_MACHINE_IDENT,NULL,(size_t)0);
buffer=(char *)malloc(bufsize+1);
confstr(_CS_MACHINE_IDENT,buffer,bufsize+1);
The first line will return the length of the string to be returned, allocate memory based
on this value, and then call confstr() again to get the actual value.