uname - retrieve information about the current kernel
#include <sys/utsname.h>
int uname(struct utsname* buf);
Retrieves information about the current kernel and writes it into the utsname
structure pointed to by buf
.
struct utsname {
char sysname[];
char nodename[];
char release[];
char version[];
char machine[];
};
If successful, returns 0. Otherwise, returns -1 and sets errno
to describe the error.
EFAULT
: buf
is not a writable address.