From d11a56617de50d4b9b01027059e50933fe48b6cf Mon Sep 17 00:00:00 2001 From: Alfred Perlstein Date: Fri, 12 Jul 2002 06:52:44 +0000 Subject: [PATCH] regen for freebsd4_sendfile(2) compat. --- sys/kern/init_sysent.c | 11 +++++++++-- sys/kern/syscalls.c | 5 +++-- sys/sys/syscall.h | 7 ++++--- sys/sys/syscall.mk | 6 +++--- sys/sys/sysproto.h | 38 +++++++++++++++++++++++++++----------- 5 files changed, 46 insertions(+), 21 deletions(-) diff --git a/sys/kern/init_sysent.c b/sys/kern/init_sysent.c index cf8ba8038bcf..d4039f01d4b1 100644 --- a/sys/kern/init_sysent.c +++ b/sys/kern/init_sysent.c @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: src/sys/kern/syscalls.master,v 1.113 2002/06/13 23:43:53 rwatson Exp + * created from FreeBSD: src/sys/kern/syscalls.master,v 1.114 2002/06/29 17:26:19 julian Exp */ #include "opt_compat.h" @@ -20,6 +20,12 @@ #define compat(n, name) 0, (sy_call_t *)nosys #endif +#ifdef COMPAT_FREEBSD4 +#define compat4(n, name) n, (sy_call_t *)__CONCAT(freebsd4_,name) +#else +#define compat4(n, name) 0, (sy_call_t *)nosys +#endif + /* The casts are bogus but will do for now. */ struct sysent sysent[] = { { 0, (sy_call_t *)nosys }, /* 0 = syscall */ @@ -358,7 +364,7 @@ struct sysent sysent[] = { { SYF_MPSAFE | AS(sched_get_priority_min_args), (sy_call_t *)sched_get_priority_min }, /* 333 = sched_get_priority_min */ { SYF_MPSAFE | AS(sched_rr_get_interval_args), (sy_call_t *)sched_rr_get_interval }, /* 334 = sched_rr_get_interval */ { AS(utrace_args), (sy_call_t *)utrace }, /* 335 = utrace */ - { SYF_MPSAFE | AS(sendfile_args), (sy_call_t *)sendfile }, /* 336 = sendfile */ + { compat4(SYF_MPSAFE | AS(freebsd4_sendfile_args),sendfile) }, /* 336 = old sendfile */ { AS(kldsym_args), (sy_call_t *)kldsym }, /* 337 = kldsym */ { SYF_MPSAFE | AS(jail_args), (sy_call_t *)jail }, /* 338 = jail */ { 0, (sy_call_t *)nosys }, /* 339 = pioctl */ @@ -415,4 +421,5 @@ struct sysent sysent[] = { { AS(kenv_args), (sy_call_t *)kenv }, /* 390 = kenv */ { AS(lchflags_args), (sy_call_t *)lchflags }, /* 391 = lchflags */ { AS(uuidgen_args), (sy_call_t *)uuidgen }, /* 392 = uuidgen */ + { SYF_MPSAFE | AS(sendfile_args), (sy_call_t *)sendfile }, /* 393 = sendfile */ }; diff --git a/sys/kern/syscalls.c b/sys/kern/syscalls.c index 8b092fc7e36d..9ba5b8ee9ae9 100644 --- a/sys/kern/syscalls.c +++ b/sys/kern/syscalls.c @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: src/sys/kern/syscalls.master,v 1.113 2002/06/13 23:43:53 rwatson Exp + * created from FreeBSD: src/sys/kern/syscalls.master,v 1.114 2002/06/29 17:26:19 julian Exp */ char *syscallnames[] = { @@ -343,7 +343,7 @@ char *syscallnames[] = { "sched_get_priority_min", /* 333 = sched_get_priority_min */ "sched_rr_get_interval", /* 334 = sched_rr_get_interval */ "utrace", /* 335 = utrace */ - "sendfile", /* 336 = sendfile */ + "old.sendfile", /* 336 = old sendfile */ "kldsym", /* 337 = kldsym */ "jail", /* 338 = jail */ "#339", /* 339 = pioctl */ @@ -400,4 +400,5 @@ char *syscallnames[] = { "kenv", /* 390 = kenv */ "lchflags", /* 391 = lchflags */ "uuidgen", /* 392 = uuidgen */ + "sendfile", /* 393 = sendfile */ }; diff --git a/sys/sys/syscall.h b/sys/sys/syscall.h index 0242a215e4bd..4c0f6b24f8b2 100644 --- a/sys/sys/syscall.h +++ b/sys/sys/syscall.h @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: src/sys/kern/syscalls.master,v 1.113 2002/06/13 23:43:53 rwatson Exp + * created from FreeBSD: src/sys/kern/syscalls.master,v 1.114 2002/06/29 17:26:19 julian Exp */ #define SYS_syscall 0 @@ -260,7 +260,7 @@ #define SYS_sched_get_priority_min 333 #define SYS_sched_rr_get_interval 334 #define SYS_utrace 335 -#define SYS_sendfile 336 + /* 336 is old sendfile */ #define SYS_kldsym 337 #define SYS_jail 338 #define SYS_sigprocmask 340 @@ -300,4 +300,5 @@ #define SYS_kenv 390 #define SYS_lchflags 391 #define SYS_uuidgen 392 -#define SYS_MAXSYSCALL 393 +#define SYS_sendfile 393 +#define SYS_MAXSYSCALL 394 diff --git a/sys/sys/syscall.mk b/sys/sys/syscall.mk index 24cf95a16e86..88d676727fa9 100644 --- a/sys/sys/syscall.mk +++ b/sys/sys/syscall.mk @@ -1,7 +1,7 @@ # FreeBSD system call names. # DO NOT EDIT-- this file is automatically generated. # $FreeBSD$ -# created from FreeBSD: src/sys/kern/syscalls.master,v 1.113 2002/06/13 23:43:53 rwatson Exp +# created from FreeBSD: src/sys/kern/syscalls.master,v 1.114 2002/06/29 17:26:19 julian Exp MIASM = \ syscall.o \ exit.o \ @@ -210,7 +210,6 @@ MIASM = \ sched_get_priority_min.o \ sched_rr_get_interval.o \ utrace.o \ - sendfile.o \ kldsym.o \ jail.o \ sigprocmask.o \ @@ -249,4 +248,5 @@ MIASM = \ kse_yield.o \ kenv.o \ lchflags.o \ - uuidgen.o + uuidgen.o \ + sendfile.o diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h index 8166e1b1c5af..c00d6f3bae2a 100644 --- a/sys/sys/sysproto.h +++ b/sys/sys/sysproto.h @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: src/sys/kern/syscalls.master,v 1.113 2002/06/13 23:43:53 rwatson Exp + * created from FreeBSD: src/sys/kern/syscalls.master,v 1.114 2002/06/29 17:26:19 julian Exp */ #ifndef _SYS_SYSPROTO_H_ @@ -907,15 +907,6 @@ struct utrace_args { char addr_l_[PADL_(const void *)]; const void * addr; char addr_r_[PADR_(const void *)]; char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; }; -struct sendfile_args { - char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; - char offset_l_[PADL_(off_t)]; off_t offset; char offset_r_[PADR_(off_t)]; - char nbytes_l_[PADL_(size_t)]; size_t nbytes; char nbytes_r_[PADR_(size_t)]; - char hdtr_l_[PADL_(struct sf_hdtr *)]; struct sf_hdtr * hdtr; char hdtr_r_[PADR_(struct sf_hdtr *)]; - char sbytes_l_[PADL_(off_t *)]; off_t * sbytes; char sbytes_r_[PADR_(off_t *)]; - char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; -}; struct kldsym_args { char fileid_l_[PADL_(int)]; int fileid; char fileid_r_[PADR_(int)]; char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; @@ -1097,6 +1088,15 @@ struct uuidgen_args { char store_l_[PADL_(struct uuid *)]; struct uuid * store; char store_r_[PADR_(struct uuid *)]; char count_l_[PADL_(int)]; int count; char count_r_[PADR_(int)]; }; +struct sendfile_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; + char offset_l_[PADL_(off_t)]; off_t offset; char offset_r_[PADR_(off_t)]; + char nbytes_l_[PADL_(size_t)]; size_t nbytes; char nbytes_r_[PADR_(size_t)]; + char hdtr_l_[PADL_(struct sf_hdtr *)]; struct sf_hdtr * hdtr; char hdtr_r_[PADR_(struct sf_hdtr *)]; + char sbytes_l_[PADL_(off_t *)]; off_t * sbytes; char sbytes_r_[PADR_(off_t *)]; + char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; +}; int nosys(struct thread *, struct nosys_args *); void sys_exit(struct thread *, struct sys_exit_args *); int fork(struct thread *, struct fork_args *); @@ -1302,7 +1302,6 @@ int sched_get_priority_max(struct thread *, struct sched_get_priority_max_args * int sched_get_priority_min(struct thread *, struct sched_get_priority_min_args *); int sched_rr_get_interval(struct thread *, struct sched_rr_get_interval_args *); int utrace(struct thread *, struct utrace_args *); -int sendfile(struct thread *, struct sendfile_args *); int kldsym(struct thread *, struct kldsym_args *); int jail(struct thread *, struct jail_args *); int sigprocmask(struct thread *, struct sigprocmask_args *); @@ -1343,6 +1342,7 @@ int kse_yield(struct thread *, struct kse_yield_args *); int kenv(struct thread *, struct kenv_args *); int lchflags(struct thread *, struct lchflags_args *); int uuidgen(struct thread *, struct uuidgen_args *); +int sendfile(struct thread *, struct sendfile_args *); #ifdef COMPAT_43 @@ -1511,6 +1511,22 @@ int ogetdirentries(struct thread *, struct ogetdirentries_args *); #endif /* COMPAT_43 */ + +#ifdef COMPAT_FREEBSD4 + +struct freebsd4_sendfile_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; + char offset_l_[PADL_(off_t)]; off_t offset; char offset_r_[PADR_(off_t)]; + char nbytes_l_[PADL_(size_t)]; size_t nbytes; char nbytes_r_[PADR_(size_t)]; + char hdtr_l_[PADL_(struct sf_hdtr *)]; struct sf_hdtr * hdtr; char hdtr_r_[PADR_(struct sf_hdtr *)]; + char sbytes_l_[PADL_(off_t *)]; off_t * sbytes; char sbytes_r_[PADR_(off_t *)]; + char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; +}; +int freebsd4_sendfile(struct thread *, struct freebsd4_sendfile_args *); + +#endif /* COMPAT_FREEBSD4 */ + #undef PAD_ #undef PADL_ #undef PADR_