Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ uname(2) — SunOS 5.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

uname(1)

sysinfo(2)

sysconf(3C)

uname(2)

NAME

uname − get name of current operating system

SYNOPSIS

#include <sys/utsname.h>

int uname(struct utsname ∗name);

DESCRIPTION

uname() stores information identifying the current operating system in the structure pointed to by name. 

uname() uses the structure utsname defined in <sys/utsname.h> whose members include:

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

uname() returns a null-terminated character string naming the current operating system in the character array sysname.  Similarly, nodename contains the name that the system is known by on a communications network.  release and version further identify the operating system.  machine contains a standard name that identifies the hardware that the operating system is running on. 

RETURN VALUES

Upon successful completion, a non-negative value is returned.  Otherwise, a value of −1 is returned and errno is set to indicate the error. 

ERRORS

EFAULT uname() fails if name points to an illegal address. 

SEE ALSO

uname(1), sysinfo(2), sysconf(3C)

SunOS 5.1  —  Last change: 5 Jul 1990

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