UNAME(2) COMMAND REFERENCE UNAME(2)
NAME
uname - get name of current system
SYNOPSIS
#include <sys/utsname.h>
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> 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 system in the character array sysname. Similarly,
nodename contains the name that the system is known by on a
communications network. Nodename contains the first 8
characters of the hostname that was set using
sethostname(2). The complete name is available using
gethostname(2). Release and version further identify the
operating system. Machine contains a standard name that
identifies the hardware that the system is running on.
DIAGNOSTICS
Uname will fail is the following is true:
[EFAULT]
Name points to an invalid address.
RETURN VALUE
Upon successful completion, a non-negative value is
returned. Otherwise, a value of -1 is returned and errno is
set to indicate the error.
SEE ALSO
uname(1), gethostname(2), sethostname(2).
Printed 10/17/86 1
%%index%%
na:72,70;
sy:142,451;
de:593,1233;
di:1826,223;
rv:2049,245;
se:2294,165;
%%index%%000000000107