diff options
author | jkim <jkim@FreeBSD.org> | 2012-04-16 21:22:02 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2012-04-16 21:22:02 +0000 |
commit | e210f689a88fc9c69c2a71393cc5e81321bd8320 (patch) | |
tree | 0929b9d6ba911ed85df4be1049f50e0052c10a5d /sys/amd64 | |
parent | 10552859c1b4a35e872654ec21f766ebac5186ee (diff) | |
download | FreeBSD-src-e210f689a88fc9c69c2a71393cc5e81321bd8320.zip FreeBSD-src-e210f689a88fc9c69c2a71393cc5e81321bd8320.tar.gz |
- Implement pipe2 syscall for Linuxulator. This syscall appeared in 2.6.27
but GNU libc used it without checking its kernel version, e. g., Fedora 10.
- Move pipe(2) implementation for Linuxulator from MD files to MI file,
sys/compat/linux/linux_file.c. There is no MD code for this syscall at all.
- Correct an argument type for pipe() from l_ulong * to l_int *. Probably
this was the source of MI/MD confusion.
Reviewed by: emulation
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/linux32/linux32_dummy.c | 1 | ||||
-rw-r--r-- | sys/amd64/linux32/linux32_machdep.c | 19 | ||||
-rw-r--r-- | sys/amd64/linux32/syscalls.master | 4 |
3 files changed, 2 insertions, 22 deletions
diff --git a/sys/amd64/linux32/linux32_dummy.c b/sys/amd64/linux32/linux32_dummy.c index 38c920d..9abc0ee 100644 --- a/sys/amd64/linux32/linux32_dummy.c +++ b/sys/amd64/linux32/linux32_dummy.c @@ -122,7 +122,6 @@ DUMMY(signalfd4); DUMMY(eventfd2); DUMMY(epoll_create1); DUMMY(dup3); -DUMMY(pipe2); DUMMY(inotify_init1); /* linux 2.6.30: */ DUMMY(preadv); diff --git a/sys/amd64/linux32/linux32_machdep.c b/sys/amd64/linux32/linux32_machdep.c index abcdd3e..7725163 100644 --- a/sys/amd64/linux32/linux32_machdep.c +++ b/sys/amd64/linux32/linux32_machdep.c @@ -698,25 +698,6 @@ linux_iopl(struct thread *td, struct linux_iopl_args *args) } int -linux_pipe(struct thread *td, struct linux_pipe_args *args) -{ - int error; - int fildes[2]; - -#ifdef DEBUG - if (ldebug(pipe)) - printf(ARGS(pipe, "*")); -#endif - - error = kern_pipe(td, fildes); - if (error) - return (error); - - /* XXX: Close descriptors on error. */ - return (copyout(fildes, args->pipefds, sizeof fildes)); -} - -int linux_sigaction(struct thread *td, struct linux_sigaction_args *args) { l_osigaction_t osa; diff --git a/sys/amd64/linux32/syscalls.master b/sys/amd64/linux32/syscalls.master index d29966f..4b85bf0 100644 --- a/sys/amd64/linux32/syscalls.master +++ b/sys/amd64/linux32/syscalls.master @@ -95,7 +95,7 @@ 39 AUE_MKDIR STD { int linux_mkdir(char *path, l_int mode); } 40 AUE_RMDIR STD { int linux_rmdir(char *path); } 41 AUE_DUP NOPROTO { int dup(u_int fd); } -42 AUE_PIPE STD { int linux_pipe(l_ulong *pipefds); } +42 AUE_PIPE STD { int linux_pipe(l_int *pipefds); } 43 AUE_NULL STD { int linux_times(struct l_times_argv *buf); } 44 AUE_NULL UNIMPL prof 45 AUE_NULL STD { int linux_brk(l_ulong dsend); } @@ -536,7 +536,7 @@ 328 AUE_NULL STD { int linux_eventfd2(void); } 329 AUE_NULL STD { int linux_epoll_create1(void); } 330 AUE_NULL STD { int linux_dup3(void); } -331 AUE_NULL STD { int linux_pipe2(void); } +331 AUE_NULL STD { int linux_pipe2(l_int *pipefds, l_int flags); } 332 AUE_NULL STD { int linux_inotify_init1(void); } ; linux 2.6.30: 333 AUE_NULL STD { int linux_preadv(void); } |