UNAME(2V) — SYSTEM CALLS
NAME
uname − get information about current system
SYNOPSIS
#include <sys/utsname.h>
int uname (name)
struct utsname ∗name;
DESCRIPTION
uname() stores information identifying the current operating system in the structure pointed to by name.
uname() uses the structure defined in <sys/utsname.h>, the members of which are:
struct utsname {
charsysname[9];
charnodename[9];
charnodeext[65-9];
charrelease[9];
charversion[9];
charmachine[9];
}
uname() places a null-terminated character string naming the current operating system in the character array sysname; this string is OS/MP on Solbourne systems. nodename is set to the name that the system is known by on a communications network; this is the same value as is returned by gethostname(2). release and version are set to values that further identify the operating system. machine is set to a standard name that identifies the hardware on which the OS/MP system is running. This is the same as the value displayed by arch(1).
RETURN VALUES
uname() returns:
0 on success.
−1 on failure.
SEE ALSO
arch(1), uname(1), gethostname(2)
NOTES
nodeext is provided for backwards compatability with previous OS/MP Releases and provides space for node names longer than eight bytes. Applications should not use nodeext. To be maximally portable, applications that want to copy the node name to another string should use strlen(nodename) rather than the constant 9 or sizeof(nodename) as the size of the target string.
System administrators should note that systems with node names longer than eight bytes do not conform to IEEE Std 1003.1-1988, System V Interface Definition (Issue 2), or X/Open Portability Guide (Issue 2) requirements.
Solbourne Computer, Inc. — 4 Feb 1991