Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ uname(2) — Ultrix/UWS 4.0 VAX

Media Vault

Software Library

Restoration Projects

Artifacts Sought

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 uname system call stores information identifying the current system in the structure pointed to by name.

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

charsysname[SYS_NMLN];
charnodename[SYS_NMLN];
charrelease[SYS_NMLN];
charversion[SYS_NMLN];
charmachine[SYS_NMLN];

The constant SYS_NMLN is defined in <limits.h>.

The uname 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 Value

Upon successful completion, a nonnegative value is returned.  Otherwise, −1 is returned, and errno is set to indicate the error. 

Diagnostics

[EFAULT] The uname system call fails if name points to an invalid address. 

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