|
|
1.1 root 1: .TH UNAME 2
2: .SH NAME
3: uname \- get name of current \s-1UNIX\s0 system
4: .SH SYNOPSIS
5: .B #include <sys/utsname.h>
6: .PP
7: .B int uname (name)
8: .br
9: .B struct utsname \(**name;
10: .SH DESCRIPTION
11: .I Uname\^
12: stores
13: information identifying the current
14: .SM UNIX
15: system in the structure pointed to by
16: .IR name .
17: .PP
18: .I Uname\^
19: uses the structure
20: defined in \f3<sys/utsname.h>\fP whose members are:
21: .PP
22: .RS
23: char sysname[9];
24: .br
25: char nodename[9];
26: .br
27: char release[9];
28: .br
29: char version[9];
30: .br
31: char machine[9];
32: .RE
33: .PP
34: .I Uname\^
35: returns
36: a null-terminated character string naming the current
37: .SM UNIX
38: system in the character array
39: .IR sysname .
40: Similarly,
41: .I nodename\^
42: contains the name that the system is known by on a communications
43: network.
44: .I Release\^
45: and
46: .I version\^
47: further identify the operating system.
48: .I Machine\^
49: contains a standard name that identifies the hardware that
50: the
51: .SM UNIX
52: system is running on.
53: .PP
54: .TP \w'[\s-1EFAULT\s+2]\ \ 'u
55: .TP
56: .SM
57: \%[EFAULT]
58: .I Uname\^
59: will fail if
60: .I name\^
61: points to an invalid address.
62: .SH "RETURN VALUE"
63: Upon successful completion, a non-negative value is returned.
64: Otherwise, \-1 is returned and
65: .I errno\^
66: is set to indicate the error.
67: .SH SEE ALSO
68: uname(1) in the
69: \f2\s-1UNIX\s+1 System User Reference Manual\fR.
70: .\" @(#)uname.2 6.2 of 9/6/83
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.