summaryrefslogtreecommitdiff
path: root/Base/usr/share/man/man2/uname.md
blob: 61da6b3bbd550504293d38bb82426e078c5e6ddf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
## Name

uname - retrieve information about the current kernel

## Synopsis

```**c++
#include <sys/utsname.h>

int uname(struct utsname* buf);
```

## Description

Retrieves information about the current kernel and writes it into the `utsname`
structure pointed to by `buf`.

```**c++
struct utsname {
    char sysname[];
    char nodename[];
    char release[];
    char version[];
    char machine[];
};
```

## Return value

If successful, returns 0. Otherwise, returns -1 and sets `errno` to describe the error.

## Errors

* `EFAULT`: `buf` is not a writable address.

## See also

* [`uname`(1)](help://man/1/uname)