From 722bc9c00b4c4d7f5e97a7372c18c0ecf7c87a9f Mon Sep 17 00:00:00 2001 From: Brooks Davis Date: Thu, 23 Jun 2016 00:30:09 +0000 Subject: [PATCH] Regen post r302096 and implement svr4_pipe(). Approved by: re (implict, fixing build) Sponsored by: DARPA, AFRL --- sys/compat/svr4/svr4_filio.c | 17 +++++++++++++++++ sys/compat/svr4/svr4_proto.h | 15 ++++++++++++++- sys/compat/svr4/svr4_syscall.h | 4 ++-- sys/compat/svr4/svr4_syscallnames.c | 4 ++-- sys/compat/svr4/svr4_sysent.c | 4 ++-- 5 files changed, 37 insertions(+), 7 deletions(-) diff --git a/sys/compat/svr4/svr4_filio.c b/sys/compat/svr4/svr4_filio.c index c92fd9878c82..1b21985af494 100644 --- a/sys/compat/svr4/svr4_filio.c +++ b/sys/compat/svr4/svr4_filio.c @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -250,3 +251,19 @@ svr4_fil_ioctl(fp, td, retval, fd, cmd, data) return 0; /* ENOSYS really */ } } + +int +svr4_pipe(struct thread *td, struct svr4_pipe_args *uap) { + int error; + int fildes[2]; + + error = kern_pipe(td, fildes, 0, NULL, NULL); + if (error) + return (error); + + td->td_retval[0] = fildes[0]; + td->td_retval[1] = fildes[1]; + + return (0); +} + diff --git a/sys/compat/svr4/svr4_proto.h b/sys/compat/svr4/svr4_proto.h index 0478d3cec889..7fac823ff76a 100644 --- a/sys/compat/svr4/svr4_proto.h +++ b/sys/compat/svr4/svr4_proto.h @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/svr4/syscalls.master 227691 2011-11-19 06:35:15Z ed + * created from FreeBSD: head/sys/compat/svr4/syscalls.master 302096 2016-06-23 00:29:03Z brooks */ #ifndef _SVR4_SYSPROTO_H_ @@ -12,8 +12,10 @@ #include #include #include +#include #include #include +#include #include @@ -93,6 +95,9 @@ struct svr4_sys_pgrpsys_args { char pid_l_[PADL_(int)]; int pid; char pid_r_[PADR_(int)]; char pgid_l_[PADL_(int)]; int pgid; char pgid_r_[PADR_(int)]; }; +struct svr4_pipe_args { + register_t dummy; +}; struct svr4_sys_times_args { char tp_l_[PADL_(struct tms *)]; struct tms * tp; char tp_r_[PADR_(struct tms *)]; }; @@ -422,6 +427,7 @@ int svr4_sys_access(struct thread *, struct svr4_sys_access_args *); int svr4_sys_nice(struct thread *, struct svr4_sys_nice_args *); int svr4_sys_kill(struct thread *, struct svr4_sys_kill_args *); int svr4_sys_pgrpsys(struct thread *, struct svr4_sys_pgrpsys_args *); +int svr4_pipe(struct thread *, struct svr4_pipe_args *); int svr4_sys_times(struct thread *, struct svr4_sys_times_args *); int svr4_sys_signal(struct thread *, struct svr4_sys_signal_args *); int svr4_sys_msgsys(struct thread *, struct svr4_sys_msgsys_args *); @@ -509,6 +515,12 @@ int svr4_sys_sendto(struct thread *, struct svr4_sys_sendto_args *); #endif /* COMPAT_FREEBSD7 */ + +#ifdef COMPAT_FREEBSD10 + + +#endif /* COMPAT_FREEBSD10 */ + #define SVR4_SYS_AUE_svr4_sys_open AUE_NULL #define SVR4_SYS_AUE_svr4_sys_wait AUE_NULL #define SVR4_SYS_AUE_svr4_sys_creat AUE_NULL @@ -525,6 +537,7 @@ int svr4_sys_sendto(struct thread *, struct svr4_sys_sendto_args *); #define SVR4_SYS_AUE_svr4_sys_nice AUE_NULL #define SVR4_SYS_AUE_svr4_sys_kill AUE_NULL #define SVR4_SYS_AUE_svr4_sys_pgrpsys AUE_NULL +#define SVR4_SYS_AUE_svr4_pipe AUE_NULL #define SVR4_SYS_AUE_svr4_sys_times AUE_NULL #define SVR4_SYS_AUE_svr4_sys_signal AUE_NULL #define SVR4_SYS_AUE_svr4_sys_msgsys AUE_NULL diff --git a/sys/compat/svr4/svr4_syscall.h b/sys/compat/svr4/svr4_syscall.h index 15005916c4ad..65e34da11687 100644 --- a/sys/compat/svr4/svr4_syscall.h +++ b/sys/compat/svr4/svr4_syscall.h @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/svr4/syscalls.master 227691 2011-11-19 06:35:15Z ed + * created from FreeBSD: head/sys/compat/svr4/syscalls.master 302096 2016-06-23 00:29:03Z brooks */ #define SVR4_SYS_exit 1 @@ -38,7 +38,7 @@ #define SVR4_SYS_svr4_sys_kill 37 #define SVR4_SYS_svr4_sys_pgrpsys 39 #define SVR4_SYS_dup 41 -#define SVR4_SYS_pipe 42 +#define SVR4_SYS_svr4_pipe 42 #define SVR4_SYS_svr4_sys_times 43 #define SVR4_SYS_setgid 46 #define SVR4_SYS_getgid 47 diff --git a/sys/compat/svr4/svr4_syscallnames.c b/sys/compat/svr4/svr4_syscallnames.c index dffc0cd964f9..da3fffc65255 100644 --- a/sys/compat/svr4/svr4_syscallnames.c +++ b/sys/compat/svr4/svr4_syscallnames.c @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/svr4/syscalls.master 227691 2011-11-19 06:35:15Z ed + * created from FreeBSD: head/sys/compat/svr4/syscalls.master 302096 2016-06-23 00:29:03Z brooks */ const char *svr4_syscallnames[] = { @@ -49,7 +49,7 @@ const char *svr4_syscallnames[] = { "svr4_sys_pgrpsys", /* 39 = svr4_sys_pgrpsys */ "#40", /* 40 = xenix */ "dup", /* 41 = dup */ - "pipe", /* 42 = pipe */ + "svr4_pipe", /* 42 = svr4_pipe */ "svr4_sys_times", /* 43 = svr4_sys_times */ "#44", /* 44 = profil */ "#45", /* 45 = plock */ diff --git a/sys/compat/svr4/svr4_sysent.c b/sys/compat/svr4/svr4_sysent.c index 1b18501e673a..711bbd2a00c7 100644 --- a/sys/compat/svr4/svr4_sysent.c +++ b/sys/compat/svr4/svr4_sysent.c @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/svr4/syscalls.master 227691 2011-11-19 06:35:15Z ed + * created from FreeBSD: head/sys/compat/svr4/syscalls.master 302096 2016-06-23 00:29:03Z brooks */ #include @@ -61,7 +61,7 @@ struct sysent svr4_sysent[] = { { AS(svr4_sys_pgrpsys_args), (sy_call_t *)svr4_sys_pgrpsys, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 39 = svr4_sys_pgrpsys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 40 = xenix */ { AS(dup_args), (sy_call_t *)sys_dup, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 41 = dup */ - { 0, (sy_call_t *)sys_pipe, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 42 = pipe */ + { 0, (sy_call_t *)svr4_pipe, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 42 = svr4_pipe */ { AS(svr4_sys_times_args), (sy_call_t *)svr4_sys_times, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 43 = svr4_sys_times */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 44 = profil */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 45 = plock */