UNAME(2) RISC/os Reference Manual UNAME(2)
NAME
uname - get general system information
SYNOPSIS
For -systype svr3 and -systype bsd43:
#include <sys/utsname.h>
int uname(un)
struct utsname *un;
DESCRIPTION
uname stores information identifying the current operating
system and machine into the structure pointed to by the
argument.
The utsname structure is defined in the include file
<sys/utsname.h>. It consists of 13 fields, 7 of which are
defined and the rest of which are reserved for future use.
The currently defined fields (with available values) are:
sysname The network identification name (same as the
hostname).
nodename The network identification name (same as the
hostname and the above sysname field).
release The operating system release name.
version The MIPS system version number.
machine The hardware type.
mtype (MIPS-specific) The MIPS hardware type.
baserel (MIPS-specific) The base release for the sys-
tem.
The valid values for these fields are defined in the
utsname.h include file.
RETURN VALUE
If successful, uname will return a non-negative value; oth-
erwise, it will return -1 and errno will indicate the error.
SEE ALSO
gethostname(2), hwconf(2).
NOTE
When these routines are used in a program which is compiled
in -systype svr3, they are not resolved by libc.a. See
intro(3) for more information.
Printed 11/19/92 Page 1