Go to the first, previous, next, last section, table of contents.


uname

Syntax

#include <sys/utsname.h>

#int uname(struct utsname *u);

Description

Fills in the structure with information about the system.

struct utsname {
  char machine[9];
  char nodename[32];
  char release[9];
  char sysname[9];
  char version[9];
};
machine
"pc"
nodename
The name of your PC (if networking is installed), else "pc".
release
The minor release of dos. For example, dos 1.23 would return "23" here.
sysname
The flavor of the OS.
version
The major release of dos. For example, dos 1.23 would return "1" here.

Return Value

Zero on success, else nonzero.

Portability

not ANSI, POSIX


Go to the first, previous, next, last section, table of contents.