UNAME(2) SysV UNAME(2)
NAME
uname - get name of current UNIX system
SYNOPSIS
#include <sys/utsname.h>
int uname (name)
struct utsname *name;
DESCRIPTION
uname stores information identifying the current Domain/OS SysV system in
the structure pointed to by name.
uname uses the structure defined in <sys/utsname.h> whose members are:
char sysname[9];
char nodename[9];
char release[9];
char version[9];
char machine[9];
uname returns a null terminated character string naming the current
Domain/OS SysV system in the character array sysname. Similarly,
nodename contains the name that the system is known by on a dial-up
communications network. release and version further identify the
operating system. machine contains a standard name that identifies the
hardware that the system is running on.
DIAGNOSTICS
A successful call returns a non-negative value. A failed call returns -1
and sets errno as indicated below.
ERRORS
[EFAULT] uname will fail if name points to an invalid address.
SEE ALSO
uname(1) in the SysV Command Reference.