mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
39 lines
621 B
Markdown
39 lines
621 B
Markdown
|
|
## 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)](../man1/uname.md)
|