From a97a1ed57051fc0c4e2f2f803a4d6a734689cbdc Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Wed, 12 Aug 2020 10:03:53 -0400 Subject: remove __syscall_lookup() --- src/_syscall.h | 91 +++++++++++++++++++++++++++++++++++++++++++++-- src/dirent/closedir.c | 5 ++- src/fcntl/fcntl.c | 2 +- src/fcntl/open.c | 2 +- src/nonstd/__libc_start.c | 2 +- src/signal/kill.c | 2 +- src/signal/raise.c | 4 +-- src/stdio/fputc.c | 2 +- src/stdio/rename.c | 2 +- src/stdlib/_Exit.c | 2 +- src/stdlib/exit.c | 2 +- src/sys/mman/mprotect.c | 2 +- src/sys/stat/chmod.c | 2 +- src/time/time.c | 2 +- src/unistd/_exit.c | 2 +- src/unistd/chdir.c | 2 +- src/unistd/chown.c | 2 +- src/unistd/close.c | 2 +- src/unistd/execve.c | 2 +- src/unistd/fork.c | 2 +- src/unistd/fsync.c | 3 +- src/unistd/ftruncate.c | 3 +- src/unistd/getcwd.c | 2 +- src/unistd/getegid.c | 2 +- src/unistd/geteuid.c | 2 +- src/unistd/getgid.c | 2 +- src/unistd/getgroups.c | 2 +- src/unistd/getpgrp.c | 2 +- src/unistd/getpid.c | 2 +- src/unistd/getppid.c | 2 +- src/unistd/getuid.c | 2 +- src/unistd/link.c | 2 +- src/unistd/lseek.c | 2 +- src/unistd/pause.c | 2 +- src/unistd/pipe.c | 2 +- src/unistd/read.c | 2 +- src/unistd/rmdir.c | 2 +- src/unistd/setgid.c | 2 +- src/unistd/setpgid.c | 2 +- src/unistd/setsid.c | 2 +- src/unistd/setuid.c | 2 +- src/unistd/unlink.c | 2 +- src/unistd/write.c | 2 +- 43 files changed, 136 insertions(+), 46 deletions(-) (limited to 'src') diff --git a/src/_syscall.h b/src/_syscall.h index fb100151..f29c2a58 100644 --- a/src/_syscall.h +++ b/src/_syscall.h @@ -6,8 +6,6 @@ #include "errno/ENOSYS.c" #endif -#include - #define SYSCALL(_name, _type, _err, _a1, _a2, _a3, _a4, _a5, _a6) \ static int _scno = -2; \ if (_scno == -2) { \ @@ -32,6 +30,93 @@ } while (0) long __syscall(long __number, ...); -long __syscall_lookup(const char *name); + +#if defined __linux__ && defined __x86_64__ +#define __sys_alarm 37 +#define __sys_brk 12 +#define __sys_chdir 80 +#define __sys_chmod 90 +#define __sys_chown 92 +#define __sys_chroot 161 +#define __sys_clock_adjtime 305 +#define __sys_clock_getres 229 +#define __sys_clock_gettime 228 +#define __sys_clock_nanosleep 230 +#define __sys_clock_settime 227 +#define __sys_close 3 +#define __sys_dup 32 +#define __sys_dup2 33 +#define __sys_execve 59 +#define __sys_execveat 322 +#define __sys_exit 60 +#define __sys_fchdir 81 +#define __sys_fchmod 91 +#define __sys_fchmodat 268 +#define __sys_fchown 93 +#define __sys_fchownat 260 +#define __sys_fcntl 72 +#define __sys_flock 73 +#define __sys_fork 57 +#define __sys_fstat 5 +#define __sys_fstatfs 138 +#define __sys_fsync 74 +#define __sys_ftruncate 77 +#define __sys_getcwd 79 +#define __sys_getegid 108 +#define __sys_geteuid 107 +#define __sys_getgid 104 +#define __sys_getgroups 115 +#define __sys_getpgid 121 +#define __sys_getpgrp 111 +#define __sys_getpid 39 +#define __sys_getppid 110 +#define __sys_getsid 124 +#define __sys_getuid 102 +#define __sys_kill 62 +#define __sys_link 86 +#define __sys_linkat 265 +#define __sys_lseek 8 +#define __sys_lstat 6 +#define __sys_mkdir 83 +#define __sys_mkdirat 258 +#define __sys_mknod 133 +#define __sys_mknodat 259 +#define __sys_mmap 9 +#define __sys_modify_ldt 154 +#define __sys_munmap 11 +#define __sys_open 2 +#define __sys_openat 257 +#define __sys_pause 34 +#define __sys_pipe 22 +#define __sys_read 0 +#define __sys_readlink 89 +#define __sys_readlinkat 267 +#define __sys_rename 82 +#define __sys_renameat 264 +#define __sys_rmdir 84 +#define __sys_setgid 106 +#define __sys_setpgid 109 +#define __sys_setregid 114 +#define __sys_setresgid 119 +#define __sys_setresuid 117 +#define __sys_setreuid 113 +#define __sys_setsid 112 +#define __sys_setuid 105 +#define __sys_stat 4 +#define __sys_statfs 137 +#define __sys_swapoff 168 +#define __sys_symlink 88 +#define __sys_symlinkat 266 +#define __sys_time 201 +#define __sys_umask 95 +#define __sys_uname 63 +#define __sys_unlink 87 +#define __sys_unlinkat 263 +#define __sys_wait4 61 +#define __sys_waitid 247 +#define __sys_write 1 +#endif + +#define __syscall_lookup(_name) (__sys_##_name) #endif diff --git a/src/dirent/closedir.c b/src/dirent/closedir.c index 566a7940..c12abfff 100644 --- a/src/dirent/closedir.c +++ b/src/dirent/closedir.c @@ -4,8 +4,11 @@ int closedir(DIR *dirp) { + /* ASSERT_NONNULL(dirp); - SYSCALL("closedir", int, -1, dirp, 0, 0, 0, 0, 0); + SYSCALL(closedir, int, -1, dirp, 0, 0, 0, 0, 0); + */ + return -1; } /* POSIX(1) diff --git a/src/fcntl/fcntl.c b/src/fcntl/fcntl.c index d2abcf48..a588ef54 100644 --- a/src/fcntl/fcntl.c +++ b/src/fcntl/fcntl.c @@ -6,7 +6,7 @@ int fcntl(int fildes, int cmd, ...) { - SYSCALL_NUMBER(scno, "fcntl", -1); + SYSCALL_NUMBER(scno, fcntl, -1); int r = -ENOSYS; enum { NONE, INT, FLOCK } arg = NONE; diff --git a/src/fcntl/open.c b/src/fcntl/open.c index 04102a64..15cee2e4 100644 --- a/src/fcntl/open.c +++ b/src/fcntl/open.c @@ -7,7 +7,7 @@ int open(const char *path, int oflag, ...) { - SYSCALL_NUMBER(scno, "open", -1); + SYSCALL_NUMBER(scno, open, -1); mode_t mode = 0; if (oflag & O_CREAT) { diff --git a/src/nonstd/__libc_start.c b/src/nonstd/__libc_start.c index c06d2ffb..d8fd5875 100644 --- a/src/nonstd/__libc_start.c +++ b/src/nonstd/__libc_start.c @@ -14,7 +14,7 @@ #include "../termios/tcflag_t.c" #include "../termios/struct_termios.c" static struct termios __tios; -#define isatty(fd) (__syscall(__lookup("tcgetattr"), fd, &__tios) == 0) +#define isatty(fd) (__syscall(__syscall_lookup(tcgetattr), fd, &__tios) == 0) #endif void __libc_start(int argc, char **argv) diff --git a/src/signal/kill.c b/src/signal/kill.c index 28b304f4..ccbb6123 100644 --- a/src/signal/kill.c +++ b/src/signal/kill.c @@ -4,7 +4,7 @@ int kill(pid_t pid, int sig) { - SYSCALL("kill", int, -1, pid, sig, 0, 0, 0, 0); + SYSCALL(kill, int, -1, pid, sig, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/signal/raise.c b/src/signal/raise.c index bfd34cf7..f61ddbdc 100644 --- a/src/signal/raise.c +++ b/src/signal/raise.c @@ -3,8 +3,8 @@ #include "unistd.h" #else #include "../_syscall.h" -#define kill(pid, sig) __syscall(__lookup("kill"), pid, sig) -#define getpid() __syscall(__lookup("getpid")) +#define kill(pid, sig) __syscall(__syscall_lookup(kill), pid, sig) +#define getpid() __syscall(__syscall_lookup(getpid)) #endif #include diff --git a/src/stdio/fputc.c b/src/stdio/fputc.c index 063d13a7..20cf5c6b 100644 --- a/src/stdio/fputc.c +++ b/src/stdio/fputc.c @@ -6,7 +6,7 @@ #include "unistd.h" #else #include "../_syscall.h" -#define write(_fd, _buf, _size) __syscall(__lookup("write"), _fd, _buf, _size) +#define write(_fd, _buf, _size) __syscall(__syscall_lookup(write), _fd, _buf, _size) #endif /** write a character to a file stream **/ diff --git a/src/stdio/rename.c b/src/stdio/rename.c index 43500cf3..d213707b 100644 --- a/src/stdio/rename.c +++ b/src/stdio/rename.c @@ -5,7 +5,7 @@ /** rename a file **/ int rename(const char *old, const char *new) { - SYSCALL_NUMBER(sc, "rename", -1); + SYSCALL_NUMBER(sc, rename, -1); int err = 0; err = __syscall(sc, old, new); diff --git a/src/stdlib/_Exit.c b/src/stdlib/_Exit.c index 9b1defdf..b4f6f1a8 100644 --- a/src/stdlib/_Exit.c +++ b/src/stdlib/_Exit.c @@ -4,7 +4,7 @@ /** cause normal program termination without handlers **/ _Noreturn void _Exit(int status) { - long scno = __lookup("exit"); + SYCALL_NUMBER(scno, "exit"); for (;;) { __syscall(scno, status); } diff --git a/src/stdlib/exit.c b/src/stdlib/exit.c index 0cba3147..5fc1f2fc 100644 --- a/src/stdlib/exit.c +++ b/src/stdlib/exit.c @@ -7,7 +7,7 @@ /** cause normal program termination **/ _Noreturn void exit(int status) { - long scno = __lookup("exit"); + long scno = __syscall_lookup(exit); struct atexit *ae = &(__stdlib.atexit); /* execute all atexit() registered functions in reverse order */ diff --git a/src/sys/mman/mprotect.c b/src/sys/mman/mprotect.c index ebce6e68..e2aa6b3b 100644 --- a/src/sys/mman/mprotect.c +++ b/src/sys/mman/mprotect.c @@ -1,6 +1,6 @@ #include -int mprotect(void *addr, size_t len, int prot); +int mprotect(void *addr, size_t len, int prot) { return prot; } diff --git a/src/sys/stat/chmod.c b/src/sys/stat/chmod.c index 6b0d8c1a..975cf01a 100644 --- a/src/sys/stat/chmod.c +++ b/src/sys/stat/chmod.c @@ -4,7 +4,7 @@ int chmod(const char *path, mode_t mode) { - SYSCALL("chmod", int, -1, path, mode, 0, 0, 0, 0); + SYSCALL(chmod, int, -1, path, mode, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/time/time.c b/src/time/time.c index 7166e2df..96e8ed19 100644 --- a/src/time/time.c +++ b/src/time/time.c @@ -7,7 +7,7 @@ time_t time(time_t * timer) { long int now; - SYSCALL_NUMBER(sc, "time", 0); + SYSCALL_NUMBER(sc, time, 0); now = __syscall(sc); diff --git a/src/unistd/_exit.c b/src/unistd/_exit.c index 53e7ddba..f892dd59 100644 --- a/src/unistd/_exit.c +++ b/src/unistd/_exit.c @@ -5,7 +5,7 @@ void _exit(int status) { - long scno = __lookup("exit"); + long scno = __syscall_lookup(exit); for (;;) { __syscall(scno, status); } diff --git a/src/unistd/chdir.c b/src/unistd/chdir.c index 203be533..e4061feb 100644 --- a/src/unistd/chdir.c +++ b/src/unistd/chdir.c @@ -5,7 +5,7 @@ int chdir(const char *path) { - SYSCALL("chdir", int, -1, path, 0, 0, 0, 0, 0); + SYSCALL(chdir, int, -1, path, 0, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/chown.c b/src/unistd/chown.c index 2036fb28..9f931765 100644 --- a/src/unistd/chown.c +++ b/src/unistd/chown.c @@ -5,7 +5,7 @@ int chown(const char *path, uid_t owner, gid_t group) { - SYSCALL("chown", int, -1, path, owner, group, 0, 0, 0); + SYSCALL(chown, int, -1, path, owner, group, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/close.c b/src/unistd/close.c index 4c917e27..e3e038cc 100644 --- a/src/unistd/close.c +++ b/src/unistd/close.c @@ -5,7 +5,7 @@ int close(int fildes) { - SYSCALL("close", int, -1, fildes, 0, 0, 0, 0, 0); + SYSCALL(close, int, -1, fildes, 0, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/execve.c b/src/unistd/execve.c index 96539df2..81e39b93 100644 --- a/src/unistd/execve.c +++ b/src/unistd/execve.c @@ -5,7 +5,7 @@ int execve(const char *path, char *const argv[], char *const envp[]) { - SYSCALL_NUMBER(scno, "execve", -1); + SYSCALL_NUMBER(scno, execve, -1); errno = -__syscall(scno, path, argv, envp); return -1; } diff --git a/src/unistd/fork.c b/src/unistd/fork.c index 0417a60b..298de865 100644 --- a/src/unistd/fork.c +++ b/src/unistd/fork.c @@ -6,7 +6,7 @@ pid_t fork(void) { - SYSCALL("fork", pid_t, -1, 0, 0, 0, 0, 0, 0); + SYSCALL(fork, pid_t, -1, 0, 0, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/fsync.c b/src/unistd/fsync.c index 35d70cbb..b0dd3820 100644 --- a/src/unistd/fsync.c +++ b/src/unistd/fsync.c @@ -1,12 +1,13 @@ #include -#include "__nonstd.h" int fsync(int fildes) { + /* __POSIX_MIN(199309L); __POSIX_OPTION(_FSYNC); __XOPEN_MIN(4); __SC(int, fildes); + */ } /* diff --git a/src/unistd/ftruncate.c b/src/unistd/ftruncate.c index 8e6cf27f..6723321f 100644 --- a/src/unistd/ftruncate.c +++ b/src/unistd/ftruncate.c @@ -1,12 +1,13 @@ #include -#include "__nonstd.h" int ftruncate(int fildes, off_t length) { + /* __POSIX_MIN(199309L); __POSIX_OPTION_OR(_MAPPED_FILES, _SHARED_MEMORY); __XOPEN_MIN(450); __SC(int, fildes, length); + */ } /* diff --git a/src/unistd/getcwd.c b/src/unistd/getcwd.c index 3ddfa53a..7a37a7c2 100644 --- a/src/unistd/getcwd.c +++ b/src/unistd/getcwd.c @@ -6,7 +6,7 @@ char * getcwd(char *buf, size_t size) { ASSERT_NONNULL(buf); - SYSCALL("getcwd", char *, NULL, buf, size, 0, 0, 0, 0); + SYSCALL(getcwd, char *, NULL, buf, size, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/getegid.c b/src/unistd/getegid.c index eecc5a06..0c39a84a 100644 --- a/src/unistd/getegid.c +++ b/src/unistd/getegid.c @@ -5,7 +5,7 @@ gid_t getegid(void) { - SYSCALL("getegid", gid_t, -1, 0, 0, 0, 0, 0, 0); + SYSCALL(getegid, gid_t, -1, 0, 0, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/geteuid.c b/src/unistd/geteuid.c index 8c7aa204..9ccb56de 100644 --- a/src/unistd/geteuid.c +++ b/src/unistd/geteuid.c @@ -5,7 +5,7 @@ uid_t geteuid(void) { - SYSCALL("geteuid", uid_t, -1, 0, 0, 0, 0, 0, 0); + SYSCALL(geteuid, uid_t, -1, 0, 0, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/getgid.c b/src/unistd/getgid.c index f991f18d..28888be0 100644 --- a/src/unistd/getgid.c +++ b/src/unistd/getgid.c @@ -5,7 +5,7 @@ gid_t getgid(void) { - SYSCALL("getgid", gid_t, -1, 0, 0, 0, 0, 0, 0); + SYSCALL(getgid, gid_t, -1, 0, 0, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/getgroups.c b/src/unistd/getgroups.c index 62a3207e..b7df2896 100644 --- a/src/unistd/getgroups.c +++ b/src/unistd/getgroups.c @@ -10,7 +10,7 @@ int getgroups(int gidsetsize, gid_t grouplist[]) if (gidsetsize != 0) { ASSERT_NONNULL(grouplist); } - SYSCALL("getgroups", int, -1, gidsetsize, grouplist, 0, 0, 0, 0); + SYSCALL(getgroups, int, -1, gidsetsize, grouplist, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/getpgrp.c b/src/unistd/getpgrp.c index 8f06b9e8..7654afcb 100644 --- a/src/unistd/getpgrp.c +++ b/src/unistd/getpgrp.c @@ -5,7 +5,7 @@ pid_t getpgrp(void) { - SYSCALL("getpgrp", pid_t, -1, 0, 0, 0, 0, 0, 0); + SYSCALL(getpgrp, pid_t, -1, 0, 0, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/getpid.c b/src/unistd/getpid.c index d1255f5d..2c638c3c 100644 --- a/src/unistd/getpid.c +++ b/src/unistd/getpid.c @@ -5,7 +5,7 @@ pid_t getpid(void) { - SYSCALL("getpid", pid_t, -1, 0, 0, 0, 0, 0, 0); + SYSCALL(getpid, pid_t, -1, 0, 0, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/getppid.c b/src/unistd/getppid.c index b39c36bc..642501f0 100644 --- a/src/unistd/getppid.c +++ b/src/unistd/getppid.c @@ -5,7 +5,7 @@ pid_t getppid(void) { - SYSCALL("getppid", pid_t, -1, 0, 0, 0, 0, 0, 0); + SYSCALL(getppid, pid_t, -1, 0, 0, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/getuid.c b/src/unistd/getuid.c index 4373915a..baccfa34 100644 --- a/src/unistd/getuid.c +++ b/src/unistd/getuid.c @@ -5,7 +5,7 @@ uid_t getuid(void) { - SYSCALL("getuid", uid_t, -1, 0, 0, 0, 0, 0, 0); + SYSCALL(getuid, uid_t, -1, 0, 0, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/link.c b/src/unistd/link.c index 1f0b0db9..93726cb3 100644 --- a/src/unistd/link.c +++ b/src/unistd/link.c @@ -5,7 +5,7 @@ int link(const char *path1, const char *path2) { - SYSCALL("link", int, -1, path1, path2, 0, 0, 0, 0); + SYSCALL(link, int, -1, path1, path2, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/lseek.c b/src/unistd/lseek.c index 52665cd6..a277efbd 100644 --- a/src/unistd/lseek.c +++ b/src/unistd/lseek.c @@ -5,7 +5,7 @@ off_t lseek(int fildes, off_t offset, int whence) { - SYSCALL("lseek", off_t, -1, fildes, offset, whence, 0, 0, 0); + SYSCALL(lseek, off_t, -1, fildes, offset, whence, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/pause.c b/src/unistd/pause.c index 99e079cd..d69900f9 100644 --- a/src/unistd/pause.c +++ b/src/unistd/pause.c @@ -5,7 +5,7 @@ int pause(void) { - SYSCALL("pause", int, -1, 0, 0, 0, 0, 0, 0); + SYSCALL(pause, int, -1, 0, 0, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/pipe.c b/src/unistd/pipe.c index b682f872..26e97dea 100644 --- a/src/unistd/pipe.c +++ b/src/unistd/pipe.c @@ -7,7 +7,7 @@ int pipe(int fildes[2]) { ASSERT_NONNULL(fildes); - SYSCALL("pipe", int, -1, fildes, 0, 0, 0, 0, 0); + SYSCALL(pipe, int, -1, fildes, 0, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/read.c b/src/unistd/read.c index dcaa5825..f7b91a9b 100644 --- a/src/unistd/read.c +++ b/src/unistd/read.c @@ -6,7 +6,7 @@ ssize_t read(int fildes, void *buf, size_t nbyte) { - SYSCALL("read", ssize_t, -1, fildes, buf, nbyte, 0, 0, 0); + SYSCALL(read, ssize_t, -1, fildes, buf, nbyte, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/rmdir.c b/src/unistd/rmdir.c index 6e97c005..b1944f80 100644 --- a/src/unistd/rmdir.c +++ b/src/unistd/rmdir.c @@ -6,7 +6,7 @@ int rmdir(const char *path) { - SYSCALL("rmdir", int, -1, path, 0, 0, 0, 0, 0); + SYSCALL(rmdir, int, -1, path, 0, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/setgid.c b/src/unistd/setgid.c index 478387a4..30aa5223 100644 --- a/src/unistd/setgid.c +++ b/src/unistd/setgid.c @@ -5,7 +5,7 @@ int setgid(gid_t gid) { - SYSCALL("setgid", int, -1, gid, 0, 0, 0, 0, 0); + SYSCALL(setgid, int, -1, gid, 0, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/setpgid.c b/src/unistd/setpgid.c index 288dc4eb..2206446e 100644 --- a/src/unistd/setpgid.c +++ b/src/unistd/setpgid.c @@ -6,7 +6,7 @@ int setpgid(pid_t pid, pid_t pgid) { - SYSCALL("setpgid", int, -1, pid, pgid, 0, 0, 0, 0); + SYSCALL(setpgid, int, -1, pid, pgid, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/setsid.c b/src/unistd/setsid.c index 6c24594d..8dbc9d1c 100644 --- a/src/unistd/setsid.c +++ b/src/unistd/setsid.c @@ -5,7 +5,7 @@ pid_t setsid(void) { - SYSCALL("setsid", pid_t, -1, 0, 0, 0, 0, 0, 0); + SYSCALL(setsid, pid_t, -1, 0, 0, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/setuid.c b/src/unistd/setuid.c index fcb39bcb..4599b083 100644 --- a/src/unistd/setuid.c +++ b/src/unistd/setuid.c @@ -5,7 +5,7 @@ int setuid(uid_t uid) { - SYSCALL("setuid", int, -1, uid, 0, 0, 0, 0, 0); + SYSCALL(setuid, int, -1, uid, 0, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/unlink.c b/src/unistd/unlink.c index 4e7b040b..f658872d 100644 --- a/src/unistd/unlink.c +++ b/src/unistd/unlink.c @@ -7,7 +7,7 @@ int unlink(const char *path) { ASSERT_NONNULL(path); - SYSCALL("unlink", int, -1, path, 0, 0, 0, 0, 0); + SYSCALL(unlink, int, -1, path, 0, 0, 0, 0, 0); } /* POSIX(1) diff --git a/src/unistd/write.c b/src/unistd/write.c index 584eda9f..6982a359 100644 --- a/src/unistd/write.c +++ b/src/unistd/write.c @@ -9,7 +9,7 @@ ssize_t write(int fildes, const void *buf, size_t nbyte) if (nbyte != 0) { ASSERT_NONNULL(buf); } - SYSCALL("write", ssize_t, -1, fildes, buf, nbyte, 0, 0, 0); + SYSCALL(write, ssize_t, -1, fildes, buf, nbyte, 0, 0, 0); } /* POSIX(1) -- cgit v1.2.1