Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/kern/lib/libsys_linux Do not redefine linux syscall...
details: https://anonhg.NetBSD.org/src/rev/acc13d5663ea
branches: trunk
changeset: 325893:acc13d5663ea
user: njoly <njoly%NetBSD.org@localhost>
date: Fri Jan 10 19:44:47 2014 +0000
description:
Do not redefine linux syscalls arguments, just use compat ones
instead.
Include linux_socketcall.h to bring missing socket syscall
arguments/prototypes on arches that have socketcall(2).
Finally, cleanup rump linux syscall wrapper, to remove linux syscall
argument/prototype local copy.
diffstat:
sys/rump/kern/lib/libsys_linux/linux_rump.c | 19 +-----
sys/rump/kern/lib/libsys_linux/syscalls.master | 82 +++++++++++++------------
2 files changed, 46 insertions(+), 55 deletions(-)
diffs (281 lines):
diff -r 28a7aaa16f5c -r acc13d5663ea sys/rump/kern/lib/libsys_linux/linux_rump.c
--- a/sys/rump/kern/lib/libsys_linux/linux_rump.c Fri Jan 10 18:37:18 2014 +0000
+++ b/sys/rump/kern/lib/libsys_linux/linux_rump.c Fri Jan 10 19:44:47 2014 +0000
@@ -1,28 +1,13 @@
-/* $NetBSD: linux_rump.c,v 1.1 2013/12/14 10:29:45 njoly Exp $ */
+/* $NetBSD: linux_rump.c,v 1.2 2014/01/10 19:44:47 njoly Exp $ */
#include <sys/param.h>
#include <compat/linux/common/linux_types.h>
#include <compat/linux/common/linux_signal.h>
+#include <compat/linux/linux_syscallargs.h>
#include "rump_linux_syscallargs.h"
-/*
- compat/linux/arch/.../syscallargs.h and rump_linux_syscallargs.h
- define the same syscall arguments and prototypes, thus cannot be
- both used. Just copy needed linux stuff for now to avoid conflicts.
-*/
-
-struct linux_sys_mknodat_args {
- syscallarg(int) fd;
- syscallarg(const char *) path;
- syscallarg(mode_t) mode;
- syscallarg(unsigned) dev;
-};
-check_syscall_args(linux_sys_mknodat)
-
-int linux_sys_mknodat(struct lwp *, const struct linux_sys_mknodat_args *, register_t *);
-
int
rump_linux_sys_mknodat(struct lwp *l,
const struct rump_linux_sys_mknodat_args *uap, register_t *retval)
diff -r 28a7aaa16f5c -r acc13d5663ea sys/rump/kern/lib/libsys_linux/syscalls.master
--- a/sys/rump/kern/lib/libsys_linux/syscalls.master Fri Jan 10 18:37:18 2014 +0000
+++ b/sys/rump/kern/lib/libsys_linux/syscalls.master Fri Jan 10 19:44:47 2014 +0000
@@ -1,4 +1,4 @@
- $NetBSD: syscalls.master,v 1.10 2013/12/14 17:34:47 njoly Exp $
+ $NetBSD: syscalls.master,v 1.11 2014/01/10 19:44:47 njoly Exp $
; @(#)syscalls.master 8.2 (Berkeley) 1/13/94
@@ -34,6 +34,12 @@
#include <compat/linux/common/linux_types.h>
#include <compat/linux/common/linux_signal.h>
+#include <compat/linux/linux_syscallargs.h>
+#include <compat/linux/linux_syscall.h>
+
+#ifdef LINUX_SYS_socketcall
+#include <compat/linux/common/linux_socketcall.h>
+#endif
#include "rump_linux_syscallargs.h"
@@ -45,13 +51,13 @@
3 NOARGS { ssize_t|sys||read(int fd, void *buf, size_t nbyte); }
4 NOARGS { ssize_t|sys||write(int fd, const void *buf, \
size_t nbyte); }
-5 NODEF { int|linux_sys||open(const char *path, \
+5 NOARGS { int|linux_sys||open(const char *path, \
int flags, int mode); }
6 NOARGS { int|sys||close(int fd); }
7 UNIMPL wait4
8 UNIMPL creat
9 NOARGS { int|sys||link(const char *path, const char *link); }
-10 NODEF { int|linux_sys||unlink(const char *path); }
+10 NOARGS { int|linux_sys||unlink(const char *path); }
11 UNIMPL execv
12 NOARGS { int|sys||chdir(const char *path); }
13 NOARGS { int|sys||fchdir(int fd); }
@@ -69,18 +75,18 @@
24 NOARGS { uid_t|sys||getuid_with_euid(void); } getuid
25 NOARGS { uid_t|sys||geteuid(void); }
26 UNIMPL ptrace
-27 NODEF { ssize_t|linux_sys||recvmsg(int s, \
+27 NOARGS { ssize_t|linux_sys||recvmsg(int s, \
struct linux_msghdr *msg, int flags); }
-28 NODEF { ssize_t|linux_sys||sendmsg(int s, \
+28 NOARGS { ssize_t|linux_sys||sendmsg(int s, \
const struct linux_msghdr *msg, int flags); }
-29 NODEF { ssize_t|linux_sys||recvfrom(int s, void *buf, \
+29 NOARGS { ssize_t|linux_sys||recvfrom(int s, void *buf, \
int len, int flags, struct osockaddr *from, \
int *fromlenaddr); }
-30 NODEF { int|linux_sys||accept(int s, struct osockaddr *name, \
+30 NOARGS { int|linux_sys||accept(int s, struct osockaddr *name, \
int *anamelen); }
-31 NODEF { int|linux_sys||getpeername(int fdes, \
+31 NOARGS { int|linux_sys||getpeername(int fdes, \
struct osockaddr *asa, int *alen); }
-32 NODEF { int|linux_sys||getsockname(int fdes, \
+32 NOARGS { int|linux_sys||getsockname(int fdes, \
struct osockaddr *asa, int *alen); }
33 NOARGS { int|sys||access(const char *path, int flags); }
34 UNIMPL chflags
@@ -106,7 +112,7 @@
51 UNIMPL acct
52 UNIMPL sigpending
53 UNIMPL sigaltstack
-54 NODEF { int|linux_sys||ioctl(int fd, \
+54 NOARGS { int|linux_sys||ioctl(int fd, \
u_long com, void *data); }
55 UNIMPL reboot
56 UNIMPL revoke
@@ -149,13 +155,13 @@
89 UNIMPL getdtablesize
90 NOARGS { int|sys||dup2(int from, int to); }
91 UNIMPL getdopt
-92 NODEF { int|linux_sys||fcntl(int fd, int cmd, void *arg); }
+92 NOARGS { int|linux_sys||fcntl(int fd, int cmd, void *arg); }
93 UNIMPL select
94 UNIMPL setdopt
95 NOARGS { int|sys||fsync(int fd); }
96 UNIMPL setpriority
97 UNIMPL socket
-98 NODEF { int|linux_sys||connect(int s, \
+98 NOARGS { int|linux_sys||connect(int s, \
const struct osockaddr *name, \
unsigned int namelen); }
99 UNIMPL accept
@@ -165,9 +171,9 @@
102 UNIMPL recv
103 UNIMPL sigreturn
-104 NODEF { int|linux_sys||bind(int s, \
+104 NOARGS { int|linux_sys||bind(int s, \
const struct osockaddr *name, unsigned namelen); }
-105 NODEF { int|linux_sys||setsockopt(int s, int level, \
+105 NOARGS { int|linux_sys||setsockopt(int s, int level, \
int name, const void *val, int optlen); }
106 NOARGS { int|sys||listen(int s, int backlog); }
107 UNIMPL vtimes
@@ -181,7 +187,7 @@
115 UNIMPL vtrace
116 UNIMPL gettimeofday
117 UNIMPL getrusage
-118 NODEF { int|linux_sys||getsockopt(int s, int level, \
+118 NOARGS { int|linux_sys||getsockopt(int s, int level, \
int name, void *val, int *avalsize); }
119 UNIMPL resuba
120 NOARGS { ssize_t|sys||readv(int fd, \
@@ -200,11 +206,11 @@
130 UNIMPL oftruncate
131 NOARGS { int|sys||flock(int fd, int how); }
132 UNIMPL mkfifo
-133 NODEF { int|linux_sys||sendto(int s, void *buf, \
+133 NOARGS { int|linux_sys||sendto(int s, void *buf, \
int len, int flags, const struct osockaddr *to, \
int tolen); }
134 NOARGS { int|sys||shutdown(int s, int how); }
-135 NODEF { int|linux_sys||socketpair(int domain, int type, \
+135 NOARGS { int|linux_sys||socketpair(int domain, int type, \
int protocol, int *rsv); }
136 NOARGS { int|sys||mkdir(const char *path, mode_t mode); }
137 NOARGS { int|sys||rmdir(const char *path); }
@@ -274,9 +280,9 @@
191 UNIMPL pathconf
192 UNIMPL fpathconf
193 UNIMPL
-194 NODEF { int|linux_sys||getrlimit(int which, \
+194 NOARGS { int|linux_sys||getrlimit(int which, \
struct orlimit *rlp); }
-195 NODEF { int|linux_sys||setrlimit(int which, \
+195 NOARGS { int|linux_sys||setrlimit(int which, \
const struct orlimit *rlp); }
196 UNIMPL getdirentries
197 UNIMPL mmap
@@ -333,7 +339,7 @@
; Syscalls 240-269 are reserved for other IEEE Std1003.1b syscalls
;
240 UNIMPL nanosleep
-241 NODEF { int|linux_sys||fdatasync(int fd); }
+241 NOARGS { int|linux_sys||fdatasync(int fd); }
242 UNIMPL mlockall
243 UNIMPL munlockall
244 UNIMPL __sigtimedwait
@@ -498,12 +504,12 @@
387 UNIMPL stat30
388 UNIMPL fstat30
389 UNIMPL lstat30
-390 NODEF { int|linux_sys||getdents64(int fd, \
+390 NOARGS { int|linux_sys||getdents64(int fd, \
struct linux_dirent64 *dent, unsigned int count); }
391 UNIMPL old posix_fadvise
392 UNIMPL fhstat
393 UNIMPL ntp_gettime
-394 NODEF { int|linux_sys||socket(int domain, \
+394 NOARGS { int|linux_sys||socket(int domain, \
int type, int protocol); }
395 UNIMPL getfh
396 UNIMPL fhopen
@@ -533,12 +539,12 @@
414 UNIMPL pset_assign
415 UNIMPL _pset_bind
416 UNIMPL fadvise
-417 NODEF { int|linux_sys||select(int nd, \
+417 NOARGS { int|linux_sys||select(int nd, \
fd_set *in, fd_set *ou, fd_set *ex, \
struct timeval50 *tv); }
418 UNIMPL gettimeofday
419 UNIMPL settimeofday
-420 NODEF { int|linux_sys||utimes(const char *path, \
+420 NOARGS { int|linux_sys||utimes(const char *path, \
struct linux_timeval *tv); }
421 UNIMPL adjtime
422 UNIMPL lfs_segwait
@@ -556,15 +562,15 @@
434 UNIMPL _lwp_park
435 UNIMPL kevent
436 UNIMPL pselect
-437 NODEF { int|linux_sys||ppoll(struct pollfd *fds, \
+437 NOARGS { int|linux_sys||ppoll(struct pollfd *fds, \
u_int nfds, const struct linux_timespec *timeout, \
const linux_sigset_t *mask);}
438 UNIMPL aio_suspend
-439 NODEF { int|linux_sys||stat64(const char *path, \
+439 NOARGS { int|linux_sys||stat64(const char *path, \
struct linux_stat64 *sp); }
-440 NODEF { int|linux_sys||fstat64(int fd, \
+440 NOARGS { int|linux_sys||fstat64(int fd, \
struct linux_stat64 *sp); }
-441 NODEF { int|linux_sys||lstat64(const char *path, \
+441 NOARGS { int|linux_sys||lstat64(const char *path, \
struct linux_stat64 *sp); }
442 UNIMPL __semctl
443 UNIMPL shmctl
@@ -574,17 +580,17 @@
447 UNIMPL timer_gettime
448 UNIMPL ntp_gettime
449 UNIMPL wait4
-450 NODEF { int|linux_sys||mknod(const char *path, mode_t mode, \
+450 NOARGS { int|linux_sys||mknod(const char *path, mode_t mode, \
int dev); }
451 UNIMPL fhstat
; 452 only ever appeared in 5.99.x and can be reused after netbsd-7
452 UNIMPL 5.99 quotactl
453 UNIMPL pipe2
-454 NODEF { int|linux_sys||dup3(int from, int to, int flags); }
+454 NOARGS { int|linux_sys||dup3(int from, int to, int flags); }
455 UNIMPL kqueue1
456 UNIMPL paccept
-457 NODEF { int|linux_sys||linkat(int fd1, const char *name1, \
+457 NOARGS { int|linux_sys||linkat(int fd1, const char *name1, \
int fd2, const char *name2, int flags); }
458 NOARGS { int|sys||renameat(int fromfd, const char *from, \
int tofd, const char *to); }
@@ -593,24 +599,24 @@
mode_t mode, int PAD, unsigned dev); }
461 NOARGS { int|sys||mkdirat(int fd, const char *path, \
mode_t mode); }
-462 NODEF { int|linux_sys||faccessat(int fd, const char *path, \
+462 NOARGS { int|linux_sys||faccessat(int fd, const char *path, \
int amode); }
-463 NODEF { int|linux_sys||fchmodat(int fd, const char *path, \
+463 NOARGS { int|linux_sys||fchmodat(int fd, const char *path, \
mode_t mode); }
-464 NODEF { int|linux_sys||fchownat(int fd, const char *path, \
+464 NOARGS { int|linux_sys||fchownat(int fd, const char *path, \
uid_t owner, gid_t group, int flag); }
465 UNIMPL fexecve
-466 NODEF { int|linux_sys||fstatat64(int fd, const char *path, \
+466 NOARGS { int|linux_sys||fstatat64(int fd, const char *path, \
struct linux_stat *sp, int flag); }
-467 NODEF { int|linux_sys||utimensat(int fd, const char *path, \
+467 NOARGS { int|linux_sys||utimensat(int fd, const char *path, \
struct linux_timespec *times, int flag); }
-468 NODEF { int|linux_sys||openat(int fd, const char *path, \
+468 NOARGS { int|linux_sys||openat(int fd, const char *path, \
int flags, ... mode_t mode); }
469 NOARGS { int|sys||readlinkat(int fd, const char *path, \
char *buf, size_t bufsize); }
470 NOARGS { int|sys||symlinkat(const char *path1, int fd, \
const char *path2); }
-471 NODEF { int|linux_sys||unlinkat(int fd, const char *path, \
+471 NOARGS { int|linux_sys||unlinkat(int fd, const char *path, \
int flag); }
472 UNIMPL futimens
473 UNIMPL __quotactl
Home |
Main Index |
Thread Index |
Old Index