Files
oldlinux-files/Linux-0.98/Yggdrasil-0.98.3/usr/man/man2/uname.2
2024-02-19 00:21:16 -05:00

50 lines
821 B
Groff

.TH UNAME 2
.UC 4
.SH NAME
uname \- return system information.
.SH SYNOPSIS
.nf
.B #include <sys/utsname.h>
.B #include <unistd.h>
.B int uname(struct utsname *buf);
.fi
.SH DESCRIPTION
.B uname()
returns system information in
.I buf.
The
.B utsname
struct is as defined in /usr/include/sys/utsname.h :
.br
.nf
struct utsname {
.in 22
char sysname[9];
char nodename[MAXHOSTNAMELEN+1];
char release[9];
char version[9];
char machine[9];
};
.in 10
.fi
.PP
0 is returned on success, a negative value on error.
.SH ERRORS
.B -ERROR
is returned if
.I buf
is null.
.SH FILES
linux/kernel/sys.c
.br
/usr/include/linux/sys.h
.br
/usr/include/unistd.h
.SH SEE ALSO
sethostname(2)
.SH BUGS
release, version, machine, sysname, etc are hard coded into the
.B utsname
structure and should probably be constants in config.h.