UNAME(2-POSIX) RISC/os Reference Manual UNAME(2-POSIX)
NAME
uname - get general system information
SYNOPSIS
#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 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
system.
Each of these items is a null-terminated character array.
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.
ERRORS
If the following condition occurs, uname returns -1 and set
errno to the corresponding value:
[EFAULT] un points outside the process' allocated
address space.
Printed 1/15/91 Page 1