Commit | Line | Data |
---|---|---|
b26c9235 GW |
1 | .\" $Id: osname.3,v 1.2 1994/02/23 09:56:52 rgrimes Exp $ |
2 | .\" | |
3 | .\" This file is in the public domain. | |
8ca81eb5 | 4 | .\" |
bdf737ca GW |
5 | .Dd February 3, 1994 |
6 | .Dt OSNAME 3 | |
7 | .Os | |
8 | .Sh NAME | |
9 | .Nm _osname | |
10 | .Nd get name of running operating system | |
11 | .br | |
12 | .Nm _osnamever | |
13 | .Nd get name and version of running operating system | |
14 | .Sh SYNOPSIS | |
15 | .Ft char * | |
16 | .Fn _osname void | |
17 | .Ft char * | |
18 | .Fn _osnamever void | |
19 | .Sh DESCRIPTION | |
20 | The | |
21 | .Fn _osname | |
22 | and | |
23 | .Fn _osnamever | |
24 | functions return the name of the running operating system and a string | |
25 | giving the name and version thereof, respectively. | |
26 | The information is retrieved from the kernel using the | |
27 | .Xr uname 2 | |
28 | system call, which is then copied into a static buffer which is | |
29 | returned to the caller. | |
30 | .Sh DIAGNOSTICS | |
31 | If the | |
32 | .Xr uname 2 | |
33 | system call returns an error, | |
34 | .Dq unknown | |
35 | is returned. | |
36 | .Sh SEE ALSO | |
37 | .Xr uname 1 , | |
38 | .Xr uname 2 | |
39 | .Sh HISTORY | |
40 | The | |
41 | .Fn _osname | |
42 | and | |
43 | .Fn _osnamever | |
44 | functions appreared in | |
45 | .Fx 1.1 . | |
46 | .Sh AUTHOR | |
47 | Garrett A. Wollman |