this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add sys_shutdown() sockets syscall

+35
+1
src/kernel/emulation/linux/CMakeLists.txt
··· 81 81 network/accept.c 82 82 network/getpeername.c 83 83 network/getsockname.c 84 + network/shutdown.c 84 85 stat/fstat.c 85 86 stat/lstat.c 86 87 stat/stat.c
+23
src/kernel/emulation/linux/network/shutdown.c
··· 1 + #include "shutdown.h" 2 + #include "../base.h" 3 + #include "../errno.h" 4 + #include <asm/unistd.h> 5 + #include "socket.h" 6 + #include "duct.h" 7 + 8 + long sys_shutdown(int fd, int how) 9 + { 10 + int ret; 11 + 12 + #ifdef __NR_socketcall 13 + ret = LINUX_SYSCALL(__NR_socketcall, LINUX_SYS_SHUTDOWN, fd, how); 14 + #else 15 + ret = LINUX_SYSCALL(__NR_shutdown, fd, how); 16 + #endif 17 + 18 + if (ret < 0) 19 + ret = errno_linux_to_bsd(ret); 20 + 21 + return ret; 22 + } 23 +
+9
src/kernel/emulation/linux/network/shutdown.h
··· 1 + #ifndef LINUX_SHUTDOWN_H 2 + #define LINUX_SHUTDOWN_H 3 + 4 + long sys_shutdown(int fd, int how); 5 + 6 + #define LINUX_SYS_SHUTDOWN 13 7 + 8 + #endif 9 +
+2
src/kernel/emulation/linux/syscalls.c
··· 65 65 #include "network/getpeername.h" 66 66 #include "network/getsockname.h" 67 67 #include "network/accept.h" 68 + #include "network/shutdown.h" 68 69 #include "dirent/getdirentries.h" 69 70 #include "stat/fstat.h" 70 71 #include "stat/stat.h" ··· 137 138 [121] = sys_writev, 138 139 [123] = sys_fchown, 139 140 [124] = sys_fchmod, 141 + [134] = sys_shutdown, 140 142 [136] = sys_mkdir, 141 143 [137] = sys_rmdir, 142 144 [138] = sys_utimes,