uname(2)
NAME
uname − get name of current UNIX system
SYNTAX
#include <limits.h>
#include <sys/utsname.h>
int uname (name)
struct utsname *name;
DESCRIPTION
The uname system call stores information identifying the current ULTRIX system in the structure pointed to by name.
The uname system call uses the structure defined in <sys/utsname.h> whose members are:
charsysname[SYS_NMLN];
charnodename[SYS_NMLN];
charrelease[SYS_NMLN];
charversion[SYS_NMLN];
charmachine[SYS_NMLN];
The constant SYS_NMLN is defined in <limits.h>.
The uname system call returns a null-terminated character string naming the current ULTRIX system in the character array sysname. Similarly, nodename contains the name that the system is known by on a communications network. The release and version further identify the operating system. The machine contains a standard name that identifies the hardware that the ULTRIX system is running on.
Upon successful completion, a non-negative value is returned. Otherwise, −1 is returned and errno is set to indicate the error.
DIAGNOSTICS
[EFAULT] The uname system call will fail if name points to an invalid address.