~ubuntu-branches/ubuntu/precise/manpages-posix/precise

1 by Francesco Paolo Lovergine
rules: linking manpages-posix not manpages.
1
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved 
2 by Francesco Paolo Lovergine
* Alligned to linux main manpages edition.
2
.TH "UNAME" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
1 by Francesco Paolo Lovergine
rules: linking manpages-posix not manpages.
3
.\" uname 
4
.SH NAME
5
uname \- get the name of the current system
6
.SH SYNOPSIS
7
.LP
8
\fB#include <sys/utsname.h>
9
.br
10
.sp
11
int uname(struct utsname *\fP\fIname\fP\fB);
12
.br
13
\fP
14
.SH DESCRIPTION
15
.LP
16
The \fIuname\fP() function shall store information identifying the
17
current system in the structure pointed to by
18
\fIname\fP.
19
.LP
20
The \fIuname\fP() function uses the \fButsname\fP structure defined
21
in \fI<sys/utsname.h>\fP.
22
.LP
23
The \fIuname\fP() function shall return a string naming the current
24
system in the character array \fIsysname\fP. Similarly,
25
\fInodename\fP shall contain the name of this node within an implementation-defined
26
communications network. The arrays
27
\fIrelease\fP and \fIversion\fP shall further identify the operating
28
system. The array \fImachine\fP shall contain a name that
29
identifies the hardware that the system is running on.
30
.LP
31
The format of each member is implementation-defined.
32
.SH RETURN VALUE
33
.LP
34
Upon successful completion, a non-negative value shall be returned.
35
Otherwise, -1 shall be returned and \fIerrno\fP set to
36
indicate the error.
37
.SH ERRORS
38
.LP
39
No errors are defined.
40
.LP
41
\fIThe following sections are informative.\fP
42
.SH EXAMPLES
43
.LP
44
None.
45
.SH APPLICATION USAGE
46
.LP
47
The inclusion of the \fInodename\fP member in this structure does
48
not imply that it is sufficient information for interfacing
49
to communications networks.
50
.SH RATIONALE
51
.LP
52
The values of the structure members are not constrained to have any
53
relation to the version of this volume of
54
IEEE\ Std\ 1003.1-2001 implemented in the operating system. An application
55
should instead depend on _POSIX_VERSION and
56
related constants defined in \fI<unistd.h>\fP.
57
.LP
58
This volume of IEEE\ Std\ 1003.1-2001 does not define the sizes of
59
the members of the structure and permits them to be
60
of different sizes, although most implementations define them all
61
to be the same size: eight bytes plus one byte for the string
62
terminator. That size for \fInodename\fP is not enough for use with
63
many networks.
64
.LP
65
The \fIuname\fP() function originated in System III, System V, and
66
related implementations, and it does not exist in Version 7
67
or 4.3 BSD. The values it returns are set at system compile time in
68
those historical implementations.
69
.LP
70
4.3 BSD has \fIgethostname\fP() and \fIgethostid\fP(), which return
71
a symbolic name and a numeric value, respectively. There are
72
related \fIsethostname\fP() and \fIsethostid\fP() functions that are
73
used to set the values the other two functions return. The
74
former functions are included in this specification, the latter are
75
not.
76
.SH FUTURE DIRECTIONS
77
.LP
78
None.
79
.SH SEE ALSO
80
.LP
81
The Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<sys/utsname.h>\fP
82
.SH COPYRIGHT
83
Portions of this text are reprinted and reproduced in electronic form
84
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
85
-- Portable Operating System Interface (POSIX), The Open Group Base
86
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
87
Electrical and Electronics Engineers, Inc and The Open Group. In the
88
event of any discrepancy between this version and the original IEEE and
89
The Open Group Standard, the original IEEE and The Open Group Standard
90
is the referee document. The original Standard can be obtained online at
91
http://www.opengroup.org/unix/online.html .