diff options
| author | njoly <njoly@NetBSD.org> | 2007-10-31 21:04:02 +0000 |
|---|---|---|
| committer | njoly <njoly@NetBSD.org> | 2007-10-31 21:04:02 +0000 |
| commit | 6f36d09e870d3da3a4a0b643faf00a0ee859fc73 (patch) | |
| tree | 4fea11c40978dbe15a02ece532e81228dd753b54 /sys/compat/linux32 | |
| parent | 55ace5d0d547d9307ff2195eef7c8c2ac0e02283 (diff) | |
compat linux32 syscalls cleanup.
With stackgap and CHECK_ALT_xxx removal, some linux32 and netbsd32
syscalls are now identical.
To avoid code duplication, remove the linux32 definition and use the
netbsd32 one (no functional change).
Diffstat (limited to 'sys/compat/linux32')
| -rw-r--r-- | sys/compat/linux32/arch/amd64/syscalls.master | 16 | ||||
| -rw-r--r-- | sys/compat/linux32/common/linux32_unistd.c | 127 |
2 files changed, 10 insertions, 133 deletions
diff --git a/sys/compat/linux32/arch/amd64/syscalls.master b/sys/compat/linux32/arch/amd64/syscalls.master index 4d6b50a9c7a..7463511a9b7 100644 --- a/sys/compat/linux32/arch/amd64/syscalls.master +++ b/sys/compat/linux32/arch/amd64/syscalls.master @@ -1,4 +1,4 @@ - $NetBSD: syscalls.master,v 1.16 2007/10/27 09:16:24 njoly Exp $ + $NetBSD: syscalls.master,v 1.17 2007/10/31 21:04:02 njoly Exp $ ; NetBSD i386 COMPAT_LINUX32 system call name/number "master" file. ; (See syscalls.conf to see what it is processed into.) @@ -75,16 +75,16 @@ 7 STD { int linux32_sys_waitpid(int pid, netbsd32_intp status, \ int options);} 8 STD { int linux32_sys_creat(const netbsd32_charp path, int mode); } -9 STD { int linux32_sys_link(const netbsd32_charp path, \ +9 NOARGS { int netbsd32_link(const netbsd32_charp path, \ const netbsd32_charp link); } 10 STD { int linux32_sys_unlink(const netbsd32_charp path); } 11 NOARGS { int netbsd32_execve(const netbsd32_charp path, \ netbsd32_charpp argp, netbsd32_charpp envp); } -12 STD { int linux32_sys_chdir(const netbsd32_charp path); } +12 NOARGS { int netbsd32_chdir(const netbsd32_charp path); } 13 STD { int linux32_sys_time(linux32_timep_t t); } 14 STD { int linux32_sys_mknod(const netbsd32_charp path, \ int mode, int dev); } -15 STD { int linux32_sys_chmod(const netbsd32_charp path, int mode); } +15 NOARGS { int netbsd32_chmod(const netbsd32_charp path, int mode); } 16 STD { int linux32_sys_lchown16(const netbsd32_charp path, \ int uid, int gid); } 17 STD { int linux32_sys_break(netbsd32_charp nsize); } @@ -105,7 +105,7 @@ linux32_utimbufp_t times); } 31 OBSOL stty 32 OBSOL gtty -33 STD { int linux32_sys_access(const netbsd32_charp path, \ +33 NOARGS { int netbsd32_access(const netbsd32_charp path, \ int flags); } 34 NOARGS { int linux_sys_nice(int incr); } 35 OBSOL ftime @@ -113,8 +113,8 @@ 37 STD { int linux32_sys_kill(int pid, int signum); } 38 STD { int linux32_sys_rename(const netbsd32_charp from, \ const netbsd32_charp to); } -39 STD { int linux32_sys_mkdir(const netbsd32_charp path, int mode); } -40 STD { int linux32_sys_rmdir(const netbsd32_charp path); } +39 NOARGS { int netbsd32_mkdir(const netbsd32_charp path, int mode); } +40 NOARGS { int netbsd32_rmdir(const netbsd32_charp path); } 41 NOARGS { int netbsd32_dup(u_int fd); } 42 STD { int linux32_sys_pipe(netbsd32_intp fd); } 43 STD { int linux32_sys_times(linux32_tmsp_t tms); } @@ -169,7 +169,7 @@ 81 STD { int linux32_sys_setgroups16(int gidsetsize, \ linux32_gidp_t gidset); } 82 STD { int linux32_sys_oldselect(linux32_oldselectp_t lsp); } -83 STD { int linux32_sys_symlink(netbsd32_charp path, \ +83 NOARGS { int netbsd32_symlink(netbsd32_charp path, \ const netbsd32_charp link); } 84 NOARGS { int compat_43_netbsd32_lstat43(const netbsd32_charp \ path, netbsd32_stat43p_t ub); } diff --git a/sys/compat/linux32/common/linux32_unistd.c b/sys/compat/linux32/common/linux32_unistd.c index b8e661eff40..1620d4fc2f3 100644 --- a/sys/compat/linux32/common/linux32_unistd.c +++ b/sys/compat/linux32/common/linux32_unistd.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_unistd.c,v 1.11 2007/10/27 09:16:24 njoly Exp $ */ +/* $NetBSD: linux32_unistd.c,v 1.12 2007/10/31 21:04:02 njoly Exp $ */ /*- * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved. @@ -33,7 +33,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux32_unistd.c,v 1.11 2007/10/27 09:16:24 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_unistd.c,v 1.12 2007/10/31 21:04:02 njoly Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -88,24 +88,6 @@ linux32_sys_brk(l, v, retval) } int -linux32_sys_access(l, v, retval) - struct lwp *l; - void *v; - register_t *retval; -{ - struct linux32_sys_access_args /* { - syscallarg(const netbsd32_charp) path; - syscallarg(int) flags; - } */ *uap = v; - struct sys_access_args ua; - - NETBSD32TOP_UAP(path, const char); - NETBSD32TO64_UAP(flags); - - return sys_access(l, &ua, retval); -} - -int linux32_sys_llseek(l, v, retval) struct lwp *l; void *v; @@ -317,40 +299,6 @@ linux32_sys_unlink(l, v, retval) } int -linux32_sys_chdir(l, v, retval) - struct lwp *l; - void *v; - register_t *retval; -{ - struct linux32_sys_chdir_args /* { - syscallarg(const netbsd32_charp) path; - } */ *uap = v; - struct sys_chdir_args ua; - - NETBSD32TOP_UAP(path, const char); - - return sys_chdir(l, &ua, retval); -} - -int -linux32_sys_link(l, v, retval) - struct lwp *l; - void *v; - register_t *retval; -{ - struct linux32_sys_link_args /* { - syscallarg(const netbsd32_charp) path; - syscallarg(const netbsd32_charp) link; - } */ *uap = v; - struct sys_link_args ua; - - NETBSD32TOP_UAP(path, const char); - NETBSD32TOP_UAP(link, const char); - - return sys_link(l, &ua, retval); -} - -int linux32_sys_creat(l, v, retval) struct lwp *l; void *v; @@ -390,24 +338,6 @@ linux32_sys_mknod(l, v, retval) } int -linux32_sys_chmod(l, v, retval) - struct lwp *l; - void *v; - register_t *retval; -{ - struct linux32_sys_chmod_args /* { - syscallarg(const netbsd32_charp) path; - syscallarg(int) mode; - } */ *uap = v; - struct sys_chmod_args ua; - - NETBSD32TOP_UAP(path, const char); - NETBSD32TO64_UAP(mode); - - return sys_chmod(l, &ua, retval); -} - -int linux32_sys_chown16(l, v, retval) struct lwp *l; void *v; @@ -497,40 +427,6 @@ linux32_sys_rename(l, v, retval) } int -linux32_sys_mkdir(l, v, retval) - struct lwp *l; - void *v; - register_t *retval; -{ - struct linux32_sys_mkdir_args /* { - syscallarg(const netbsd32_charp) path; - syscallarg(int) mode; - } */ *uap = v; - struct sys_mkdir_args ua; - - NETBSD32TOP_UAP(path, const char); - NETBSD32TO64_UAP(mode); - - return sys_mkdir(l, &ua, retval); -} - -int -linux32_sys_rmdir(l, v, retval) - struct lwp *l; - void *v; - register_t *retval; -{ - struct linux32_sys_rmdir_args /* { - syscallarg(const netbsd32_charp) path; - } */ *uap = v; - struct sys_rmdir_args ua; - - NETBSD32TOP_UAP(path, const char); - - return sys_rmdir(l, &ua, retval); -} - -int linux32_sys_getgroups16(l, v, retval) struct lwp *l; void *v; @@ -567,25 +463,6 @@ linux32_sys_setgroups16(l, v, retval) } int -linux32_sys_symlink(l, v, retval) - struct lwp *l; - void *v; - register_t *retval; -{ - struct linux32_sys_symlink_args /* { - syscallarg(const netbsd32_charp) path; - syscallarg(const netbsd32_charp) link; - } */ *uap = v; - struct sys_symlink_args ua; - - NETBSD32TOP_UAP(path, const char); - NETBSD32TOP_UAP(link, const char); - - return sys_symlink(l, &ua, retval); -} - - -int linux32_sys_swapon(l, v, retval) struct lwp *l; void *v; |
