diff --git a/include/sys/reboot.h b/include/sys/reboot.h new file mode 100644 index 0000000..1e719ac --- /dev/null +++ b/include/sys/reboot.h @@ -0,0 +1,3 @@ +#pragma once + +void system_power_cmd(unsigned int cmd); diff --git a/include/user/ioctl.h b/include/user/ioctl.h deleted file mode 100644 index 5e9de99..0000000 --- a/include/user/ioctl.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -#if !defined(__KERNEL__) -int ioctl(int fd, unsigned int cmd, void *arg); -#endif diff --git a/include/user/netctl.h b/include/user/netctl.h index c582383..2e69104 100644 --- a/include/user/netctl.h +++ b/include/user/netctl.h @@ -2,8 +2,3 @@ #define NETCTL_SET_INADDR 0x0001 #define NETCTL_GET_INADDR 0x0002 - -#if !defined(__KERNEL__) -#include -int netctl(const char *iface, uint32_t cmd, void *arg); -#endif diff --git a/include/user/reboot.h b/include/user/reboot.h index cf77781..255ce9f 100644 --- a/include/user/reboot.h +++ b/include/user/reboot.h @@ -7,9 +7,3 @@ #define YGG_REBOOT_MAGIC1 0xD1ED1ED1 #define YGG_REBOOT_MAGIC2 0x818471ED -#if defined(__KERNEL__) -// TODO: move to kernel-only header -void system_power_cmd(unsigned int cmd); -#else -int reboot(int magic1, int magic2, unsigned int cmd, void *arg); -#endif diff --git a/include/user/signum.h b/include/user/signum.h index 7278675..2e51bc3 100644 --- a/include/user/signum.h +++ b/include/user/signum.h @@ -66,5 +66,3 @@ struct user_stack { #if !defined(__KERNEL__) typedef struct user_stack stack_t; #endif - -int kill(int pid, int signum); diff --git a/include/user/time.h b/include/user/time.h index 33f95e9..21a2c0b 100644 --- a/include/user/time.h +++ b/include/user/time.h @@ -18,6 +18,7 @@ struct timespec { typedef uint64_t time_t; +// TODO: move to kernel header #if defined(__KERNEL__) struct tm; diff --git a/include/user/utsname.h b/include/user/utsname.h index 6db2c69..e8e962b 100644 --- a/include/user/utsname.h +++ b/include/user/utsname.h @@ -8,7 +8,3 @@ struct utsname { char machine[16]; char domainname[64]; }; - -#if !defined(__KERNEL__) -int uname(struct utsname *buf); -#endif diff --git a/install-headers.sh b/install-headers.sh index 9339541..c74903d 100755 --- a/install-headers.sh +++ b/install-headers.sh @@ -9,7 +9,6 @@ KERNEL_HEADERS="include/user/fcntl.h \ include/user/errno.h \ include/user/time.h \ include/user/dirent.h \ - include/user/ioctl.h \ include/user/stat.h \ include/user/statvfs.h \ include/user/mount.h \ diff --git a/sys/sched.c b/sys/sched.c index b2a7261..2769f82 100644 --- a/sys/sched.c +++ b/sys/sched.c @@ -6,6 +6,7 @@ #include "arch/amd64/cpu.h" #include "user/signum.h" #include "user/reboot.h" +#include "sys/reboot.h" #include "sys/assert.h" #include "sys/thread.h" #include "sys/sched.h"