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