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/i386/linux | |
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/i386/linux')
-rw-r--r-- | sys/i386/linux/linux_dummy.c | 1 | ||||
-rw-r--r-- | sys/i386/linux/linux_machdep.c | 19 | ||||
-rw-r--r-- | sys/i386/linux/syscalls.master | 4 |
3 files changed, 2 insertions, 22 deletions
diff --git a/sys/i386/linux/linux_dummy.c b/sys/i386/linux/linux_dummy.c index d507b1f..31bbf6f 100644 --- a/sys/i386/linux/linux_dummy.c +++ b/sys/i386/linux/linux_dummy.c @@ -113,7 +113,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/i386/linux/linux_machdep.c b/sys/i386/linux/linux_machdep.c index 396740a..14d1892 100644 --- a/sys/i386/linux/linux_machdep.c +++ b/sys/i386/linux/linux_machdep.c @@ -587,25 +587,6 @@ linux_mprotect(struct thread *td, struct linux_mprotect_args *uap) } 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_ioperm(struct thread *td, struct linux_ioperm_args *args) { int error; diff --git a/sys/i386/linux/syscalls.master b/sys/i386/linux/syscalls.master index b158630..f452434 100644 --- a/sys/i386/linux/syscalls.master +++ b/sys/i386/linux/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); } @@ -546,7 +546,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); } |