UNAME(2) — Silicon Graphics
NAME
uname − get name of current UNIX system
SYNOPSIS
#include <sys/utsname.h>
int uname (name)
struct utsname ∗name;
DESCRIPTION
Uname stores information identifying the current UNIX system in the structure pointed to by name.
Uname uses the structure defined in <sys/utsname.h>:
structutsname {
charsysname[9];
charnodename[9];
charrelease[9];
charversion[9];
charmachine[9];
};
extern struct utsname utsname;
All fields are null except:
sysname, nodename:set to first 8 chars
of sethostname()
machine one of:M68000
M68010
Uname will fail if name points to an invalid address. [EFAULT]
RETURN VALUE
Upon successful completion, a non-negative value is returned. Otherwise, −1 is returned and errno is set to indicate the error.
SEE ALSO
ASSEMBLER
moveq#57,D0
movlname,A0| fetch argument
sublA1,A1| uname
trap#0
Carry bit set on failure and cleared on success.
Version 2.3 — July 04, 1985