Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ uname(2) — Ultrix-11 3.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

uname(1)

uname(2)

NAME

uname − get name of current UNIX system

SYNTAX

#include <sys/utsname.h>

int uname(name)
struct utsname ∗name;

DESCRIPTION

The uname system call stores information identifying the current UNIX system in the structure pointed to by name.

The uname call uses the structure defined in <sys/utsname.h>:

char    sysname[16];
char    nodename[16];
char    release[16];
char    version[16];
char    machine[16];

The uname call returns a null-terminated character string naming the current UNIX 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 UNIX system is running on. 

RETURN VALUE

If successful, returns a non-negative value.  If unsuccessful, returns a −1, and the global variable errno indicates the error code. 

DIAGNOSTICS

The uname call will fail if:

[EFAULT] The specified name points to an invalid address. 

SEE ALSO

uname(1)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026