The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
sys_uname.c File Reference
#include "syscall_internal.h"
#include "syscall.h"
#include "common/memory.h"
#include "common/string.h"
#include "kernel/process/process.h"
#include "version.h"

Macros

#define UTS_FIELD   65
 the layout of struct utsname in <sys/utsname.h>

Functions

syscall_ret_t sys_sethostname (struct registers *regs)
 SYS_sethostname: set the host name (root only).
syscall_ret_t sys_uname (struct registers *regs)
 SYS_uname: the name of the system, its release and version, and the machine.

Macro Definition Documentation

◆ UTS_FIELD

#define UTS_FIELD   65

the layout of struct utsname in <sys/utsname.h>

Function Documentation

◆ sys_sethostname()

syscall_ret_t sys_sethostname ( struct registers * regs)

SYS_sethostname: set the host name (root only).

args: the name, its length (at most 64 bytes, no NUL needed). returns 0, or -EPERM, -EINVAL (too long), -EFAULT.

◆ sys_uname()

syscall_ret_t sys_uname ( struct registers * regs)

SYS_uname: the name of the system, its release and version, and the machine.

args: the user's struct utsname. returns 0, or a negative errno.