Add "uname" system call

This commit is contained in:
Mark
2020-01-15 17:16:03 +02:00
parent 86cd5446cd
commit 05e10db0e2
6 changed files with 38 additions and 1 deletions
+2
View File
@@ -1,7 +1,9 @@
#pragma once
#include "sys/utsname.h"
#include "sys/types.h"
#include "sys/time.h"
int sys_uname(struct utsname *name);
int sys_gettimeofday(struct timeval *tv, struct timezone *tz);
int sys_nanosleep(const struct timespec *req, struct timespec *rem);
int sys_reboot(int magic1, int magic2, unsigned int cmd, void *arg);
+1
View File
@@ -31,6 +31,7 @@
#define SYSCALL_NR_SETUID 105
#define SYSCALL_NR_SETGID 106
#define SYSCALL_NR_UNAME 63
#define SYSCALL_NR_MOUNT 165
#define SYSCALL_NR_REBOOT 169
+14
View File
@@ -0,0 +1,14 @@
#pragma once
struct utsname {
char sysname[16];
char nodename[8];
char release[16];
char version[32];
char machine[16];
char domainname[64];
};
#if !defined(__KERNEL__)
int uname(struct utsname *buf);
#endif