xref: /csrg-svn/lib/libc/gen/uname.3 (revision 65428)
1*65428Sbostic.\" Copyright (c) 1994
2*65428Sbostic.\"	The Regents of the University of California.  All rights reserved.
3*65428Sbostic.\"
4*65428Sbostic.\" %sccs.include.redist.roff%
5*65428Sbostic.\"
6*65428Sbostic.\"	@(#)uname.3	8.1 (Berkeley) 01/04/94
7*65428Sbostic.\"
8*65428Sbostic.Dd ""
9*65428Sbostic.Dt UNAME 3
10*65428Sbostic.Os
11*65428Sbostic.Sh NAME
12*65428Sbostic.Nm uname
13*65428Sbostic.Nd get system identification
14*65428Sbostic.Sh SYNOPSIS
15*65428Sbostic.Fd #include <sys/utsname.h>
16*65428Sbostic.Ft int
17*65428Sbostic.Fn uname "struct utsname *name"
18*65428Sbostic.Sh DESCRIPTION
19*65428SbosticThe
20*65428Sbostic.Fn uname
21*65428Sbosticfunction stores nul-terminated strings of information identifying
22*65428Sbosticthe current system into the structure referenced by
23*65428Sbostic.Fa name .
24*65428Sbostic.Pp
25*65428SbosticThe
26*65428Sbostic.Li utsname
27*65428Sbosticstructure is defined in the
28*65428Sbostic.Li <sys/utsname.h>
29*65428Sbosticheader file, and contains the following members:
30*65428Sbostic.Bl -tag -width nodenameXXXX -offset indent
31*65428Sbostic.It sysname
32*65428SbosticName of the operating system implementation.
33*65428Sbostic.It nodename
34*65428SbosticNetwork name of this machine.
35*65428Sbostic.It release
36*65428SbosticRelease level of the operating system.
37*65428Sbostic.It version
38*65428SbosticVersion level of the operating system.
39*65428Sbostic.It machine
40*65428SbosticMachine hardware platform.
41*65428Sbostic.El
42*65428Sbostic.Sh RETURN VALUES
43*65428SbosticIf
44*65428Sbostic.Nm uname
45*65428Sbosticis successful, 0 is returned, otherwise, -1 is returned and
46*65428Sbostic.Va errno
47*65428Sbosticis set appropriately.
48*65428Sbostic.Sh ERRORS
49*65428SbosticThe
50*65428Sbostic.Fn uname
51*65428Sbosticfunction may fail and set
52*65428Sbostic.Va errno
53*65428Sbosticfor any of the errors specified for the library functions
54*65428Sbostic.Xr sysctl 3 .
55*65428Sbostic.Sh SEE ALSO
56*65428Sbostic.Xr uname 1 ,
57*65428Sbostic.Xr sysctl 3
58*65428Sbostic.Sh STANDARDS
59*65428SbosticThe
60*65428Sbostic.Fn uname
61*65428Sbosticfunction conforms to
62*65428Sbostic.St -p1003.1-88 .
63*65428Sbostic.Sh HISTORY
64*65428SbosticThe
65*65428Sbostic.Nm uname
66*65428Sbosticfunction first appeared in 4.4BSD.
67