UNAME(2) HP Integral PC UNAME(2) UNAME(2) HP Integral PC UNAME(2) UNAME(2) HP Integral PC UNAME(2) UNAME(2) HP Integral PC UNAME(2) NAME NAME NAME NAME uname - get name of current HP-UX system SYNOPSIS SYNOPSIS SYNOPSIS SYNOPSIS #include int uname (name) struct utsname *name; HP-UX COMPATIBILITY HP-UX COMPATIBILITY HP-UX COMPATIBILITY HP-UX COMPATIBILITY Level: HP-UX/RUN ONLY Origin: System III DESCRIPTION DESCRIPTION DESCRIPTION DESCRIPTION Uname stores information identifying the current HP-UX system in the structure pointed to by name . Uname uses the structure defined in : #define UTSLEN 9 #define SNLEN 15 struct utsname { char sysname[UTSLEN]; char nodename[UTSLEN]; char release[UTSLEN]; char version[UTSLEN]; char machine[UTSLEN]; char idnumber[SNLEN]; }; extern struct utsname utsname; Uname returns a null-terminated string in each field. Sysname contains "HP-UX". Similarly, nodename contains the name that the system is known by on a communications network and is accessible via hostname(1), sethostname(2), and gethostname(2). Release contains the release number of the operating system, e.g. "1.0" or "3.0.1". Version contains additional information about the operating system. Machine contains a standard name that identifies the hardware on which the HP-UX system is running. Idnumber contains an identification number which is unique within that class of hardware, possibly a hardware or software serial number. This field may return the null string to indicate the lack of an identification number. Uname will fail if name points to an invalid address. [EFAULT] Hewlett-Packard - 1 - (printed 12/12/84) UNAME(2) HP Integral PC UNAME(2) UNAME(2) HP Integral PC UNAME(2) UNAME(2) HP Integral PC UNAME(2) UNAME(2) HP Integral PC UNAME(2) HARDWARE DEPENDENCIES HARDWARE DEPENDENCIES HARDWARE DEPENDENCIES HARDWARE DEPENDENCIES Series 200/500: The first character of the version field is set to "A" for single user, and "B" for multi-user. RETURN VALUE RETURN VALUE RETURN VALUE RETURN VALUE Upon successful completion, a non-negative value is returned. Otherwise, -1 is returned and errno is set to indicate the error. SEE ALSO SEE ALSO SEE ALSO SEE ALSO hostname(1), revision(1), uname(1), gethostname(2), sethostname(2). Hewlett-Packard - 2 - (printed 12/12/84)