Page MenuHomeFreeBSD

D1049.id2179.diff
No OneTemporary

D1049.id2179.diff

Index: sys/amd64/linux32/linux32_dummy.c
===================================================================
--- sys/amd64/linux32/linux32_dummy.c
+++ sys/amd64/linux32/linux32_dummy.c
@@ -122,7 +122,6 @@
DUMMY(signalfd4);
DUMMY(eventfd2);
DUMMY(epoll_create1);
-DUMMY(dup3);
DUMMY(inotify_init1);
/* linux 2.6.30: */
DUMMY(preadv);
Index: sys/amd64/linux32/syscalls.master
===================================================================
--- sys/amd64/linux32/syscalls.master
+++ sys/amd64/linux32/syscalls.master
@@ -538,7 +538,8 @@
327 AUE_NULL STD { int linux_signalfd4(void); }
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); }
+330 AUE_NULL STD { int linux_dup3(l_int oldfd, \
+ l_int newfd, l_int flags); }
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:
Index: sys/compat/linux/linux_file.c
===================================================================
--- sys/compat/linux/linux_file.c
+++ sys/compat/linux/linux_file.c
@@ -1624,3 +1624,22 @@
/* XXX: Close descriptors on error. */
return (copyout(fildes, args->pipefds, sizeof(fildes)));
}
+
+int
+linux_dup3(struct thread *td, struct linux_dup3_args *args)
+{
+ int cmd;
+ intptr_t newfd;
+
+ if (args->oldfd == args->newfd)
+ return (EINVAL);
+ if ((args->flags & ~LINUX_O_CLOEXEC) != 0)
+ return (EINVAL);
+ if (args->flags & LINUX_O_CLOEXEC)
+ cmd = F_DUP2FD_CLOEXEC;
+ else
+ cmd = F_DUP2FD;
+
+ newfd = args->newfd;
+ return (kern_fcntl(td, args->oldfd, cmd, newfd));
+}
Index: sys/i386/linux/linux_dummy.c
===================================================================
--- sys/i386/linux/linux_dummy.c
+++ sys/i386/linux/linux_dummy.c
@@ -118,7 +118,6 @@
DUMMY(signalfd4);
DUMMY(eventfd2);
DUMMY(epoll_create1);
-DUMMY(dup3);
DUMMY(inotify_init1);
/* linux 2.6.30: */
DUMMY(preadv);
Index: sys/i386/linux/syscalls.master
===================================================================
--- sys/i386/linux/syscalls.master
+++ sys/i386/linux/syscalls.master
@@ -546,7 +546,8 @@
327 AUE_NULL STD { int linux_signalfd4(void); }
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); }
+330 AUE_NULL STD { int linux_dup3(l_int oldfd, \
+ l_int newfd, l_int flags); }
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:

File Metadata

Mime Type
text/plain
Expires
Sun, May 24, 3:44 PM (4 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33477927
Default Alt Text
D1049.id2179.diff (2 KB)

Event Timeline