uname(2) System Calls Manual uname(2)
Name
uname - get name of current system
Syntax
#include <limits.h>
#include <sys/utsname.h>
int uname (name)
struct utsname *name;
Description
The system call stores information identifying the current system in the structure pointed to by name.
The system call uses the structure defined in whose members are:
char sysname[SYS_NMLN];
char nodename[SYS_NMLN];
char release[SYS_NMLN];
char version[SYS_NMLN];
char machine[SYS_NMLN];
The constant SYS_NMLN is defined in
The 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.
Return Values
Upon successful completion, a nonnegative value is returned. Otherwise, -1 is returned, and errno is set to indicate the error.
Diagnostics
[EFAULT] The system call fails if name points to an invalid address.
uname(2)