From owner-p4-projects@FreeBSD.ORG Wed Jun 17 20:03:51 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B5D911065673; Wed, 17 Jun 2009 20:03:50 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C351106566B for ; Wed, 17 Jun 2009 20:03:50 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 485128FC14 for ; Wed, 17 Jun 2009 20:03:50 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n5HK3nLo096772 for ; Wed, 17 Jun 2009 20:03:49 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n5HK3nBR096770 for perforce@freebsd.org; Wed, 17 Jun 2009 20:03:49 GMT (envelope-from jhb@freebsd.org) Date: Wed, 17 Jun 2009 20:03:49 GMT Message-Id: <200906172003.n5HK3nBR096770@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Cc: Subject: PERFORCE change 164620 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2009 20:03:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=164620 Change 164620 by jhb@jhb_jhbbsd on 2009/06/17 20:03:33 IFC @164619 Affected files ... .. //depot/projects/smpng/sys/arm/conf/CAMBRIA.hints#4 integrate .. //depot/projects/smpng/sys/arm/xscale/ixp425/ixp425_npe.c#8 integrate .. //depot/projects/smpng/sys/compat/freebsd32/freebsd32_proto.h#55 integrate .. //depot/projects/smpng/sys/compat/freebsd32/freebsd32_syscall.h#55 integrate .. //depot/projects/smpng/sys/compat/freebsd32/freebsd32_syscalls.c#55 integrate .. //depot/projects/smpng/sys/compat/freebsd32/freebsd32_sysent.c#56 integrate .. //depot/projects/smpng/sys/compat/freebsd32/syscalls.master#59 integrate .. //depot/projects/smpng/sys/compat/linux/linux_ioctl.c#60 integrate .. //depot/projects/smpng/sys/fs/nfsclient/nfs_clvnops.c#6 integrate .. //depot/projects/smpng/sys/i386/ibcs2/ibcs2_isc_sysent.c#12 integrate .. //depot/projects/smpng/sys/i386/ibcs2/ibcs2_xenix_sysent.c#14 integrate .. //depot/projects/smpng/sys/kern/init_sysent.c#92 integrate .. //depot/projects/smpng/sys/kern/kern_sysctl.c#66 integrate .. //depot/projects/smpng/sys/kern/makesyscalls.sh#28 integrate .. //depot/projects/smpng/sys/kern/syscalls.c#91 integrate .. //depot/projects/smpng/sys/kern/syscalls.master#97 integrate .. //depot/projects/smpng/sys/kern/systrace_args.c#18 integrate .. //depot/projects/smpng/sys/net/bpf.c#88 integrate .. //depot/projects/smpng/sys/net/if_tun.c#63 integrate .. //depot/projects/smpng/sys/netinet/tcp_subr.c#116 integrate .. //depot/projects/smpng/sys/netinet6/in6_proto.c#31 integrate .. //depot/projects/smpng/sys/powerpc/include/spr.h#16 integrate .. //depot/projects/smpng/sys/powerpc/powerpc/cpu.c#15 integrate .. //depot/projects/smpng/sys/sys/syscall.h#90 integrate .. //depot/projects/smpng/sys/sys/syscall.mk#90 integrate .. //depot/projects/smpng/sys/sys/sysproto.h#94 integrate .. //depot/projects/smpng/sys/sys/vimage.h#16 integrate .. //depot/projects/smpng/sys/ufs/ufs/ufs_dirhash.c#32 integrate Differences ... ==== //depot/projects/smpng/sys/arm/conf/CAMBRIA.hints#4 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/arm/conf/CAMBRIA.hints,v 1.4 2009/04/21 22:48:12 stas Exp $ +# $FreeBSD: src/sys/arm/conf/CAMBRIA.hints,v 1.5 2009/06/17 17:58:18 sam Exp $ # # Device wiring for the Gateworks Cambria 2358. @@ -21,11 +21,11 @@ hint.npe.0.mac="C" hint.npe.0.mii="C" hint.npe.0.phy=1 -#hint.npe.1.at="ixp0" -#hint.npe.1.npeid="A" -#hint.npe.1.mac="A" -#hint.npe.1.mii="C" -#hint.npe.1.phy=2 +hint.npe.1.at="ixp0" +hint.npe.1.npeid="A" +hint.npe.1.mac="A" +hint.npe.1.mii="C" +hint.npe.1.phy=2 # FLASH hint.cfi.0.at="ixp0" ==== //depot/projects/smpng/sys/arm/xscale/ixp425/ixp425_npe.c#8 (text+ko) ==== @@ -57,7 +57,7 @@ * SUCH DAMAGE. */ #include -__FBSDID("$FreeBSD: src/sys/arm/xscale/ixp425/ixp425_npe.c,v 1.11 2009/06/17 03:09:13 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/xscale/ixp425/ixp425_npe.c,v 1.12 2009/06/17 17:57:52 sam Exp $"); /* * Intel XScale Network Processing Engine (NPE) support. @@ -804,20 +804,34 @@ IX_NPEDL_CTXT_REG_RESET_CINDEX, }; -#define IX_NPEDL_RESET_NPE_PARITY 0x0800 #define IX_NPEDL_PARITY_BIT_MASK 0x3F00FFFF #define IX_NPEDL_CONFIG_CTRL_REG_MASK 0x3F3FFFFF +#if 0 +/* + * Reset the NPE and its coprocessor using the + * fuse bits in the feature control register. + */ +static void +npe_reset(int npeid) +{ + uint32_t mask = EXP_FCTRL_NPEA << npeid; + uint32_t v; + + v = ixp4xx_read_feature_bits(); + ixp4xx_write_feature_bits(v &~ mask); + /* un-fuse and un-reset the NPE & coprocessor */ + ixp4xx_write_feature_bits(v | mask); +} +#endif + static int npe_cpu_reset(struct ixpnpe_softc *sc) { #define N(a) (sizeof(a) / sizeof(a[0])) - struct ixp425_softc *sa = - device_get_softc(device_get_parent(sc->sc_dev)); uint32_t ctxtReg; /* identifies Context Store reg (0-3) */ uint32_t regAddr; uint32_t regVal; - uint32_t resetNpeParity; uint32_t ixNpeConfigCtrlRegVal; int i, error = 0; @@ -935,33 +949,15 @@ /* Reset the Watch-count register */ npe_reg_write(sc, IX_NPEDL_REG_OFFSET_WC, 0); - +#if 0 /* * WR IXA00055043 - Remove IMEM Parity Introduced by NPE Reset Operation + * XXX Removed because it breaks IXP435 operation; e.g. on Gateworks + * XXX 2358 boards reseting NPE-A after NPE-C is running causes both + * XXX npe's to stop working */ - - /* - * Reset the NPE and its coprocessor - to reset internal - * states and remove parity error. Note this makes no - * sense based on the documentation. The feature control - * register always reads back as 0 on the ixp425 and further - * the bit definition of NPEA/NPEB is off by 1 according to - * the Intel documention--so we're blindly following the - * Intel code w/o any real understanding. - */ - regVal = EXP_BUS_READ_4(sa, EXP_FCTRL_OFFSET); - DPRINTFn(2, sc->sc_dev, "%s: FCTRL 0x%x\n", __func__, regVal); - resetNpeParity = - IX_NPEDL_RESET_NPE_PARITY << (1 + device_get_unit(sc->sc_dev)); - DPRINTFn(2, sc->sc_dev, "%s: FCTRL fuse parity, write 0x%x\n", - __func__, regVal | resetNpeParity); - EXP_BUS_WRITE_4(sa, EXP_FCTRL_OFFSET, regVal | resetNpeParity); - - /* un-fuse and un-reset the NPE & coprocessor */ - DPRINTFn(2, sc->sc_dev, "%s: FCTRL unfuse parity, write 0x%x\n", - __func__, regVal & resetNpeParity); - EXP_BUS_WRITE_4(sa, EXP_FCTRL_OFFSET, regVal &~ resetNpeParity); - + npe_reset(sc->sc_npeid); +#endif /* * Call NpeMgr function to stop the NPE again after the Feature Control * has unfused and Un-Reset the NPE and its associated Coprocessors. ==== //depot/projects/smpng/sys/compat/freebsd32/freebsd32_proto.h#55 (text+ko) ==== @@ -2,8 +2,8 @@ * System call prototypes. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/freebsd32/freebsd32_proto.h,v 1.102 2009/06/15 20:40:23 jhb Exp $ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 194262 2009-06-15 20:38:55Z jhb + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_proto.h,v 1.103 2009/06/17 19:53:47 jhb Exp $ + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 194390 2009-06-17 19:50:38Z jhb */ #ifndef _FREEBSD32_SYSPROTO_H_ ==== //depot/projects/smpng/sys/compat/freebsd32/freebsd32_syscall.h#55 (text+ko) ==== @@ -2,8 +2,8 @@ * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscall.h,v 1.101 2009/06/15 20:40:23 jhb Exp $ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 194262 2009-06-15 20:38:55Z jhb + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscall.h,v 1.102 2009/06/17 19:53:47 jhb Exp $ + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 194390 2009-06-17 19:50:38Z jhb */ #define FREEBSD32_SYS_syscall 0 ==== //depot/projects/smpng/sys/compat/freebsd32/freebsd32_syscalls.c#55 (text+ko) ==== @@ -2,8 +2,8 @@ * System call names. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscalls.c,v 1.92 2009/06/15 20:40:23 jhb Exp $ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 194262 2009-06-15 20:38:55Z jhb + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscalls.c,v 1.93 2009/06/17 19:53:47 jhb Exp $ + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 194390 2009-06-17 19:50:38Z jhb */ const char *freebsd32_syscallnames[] = { @@ -25,7 +25,7 @@ "chmod", /* 15 = chmod */ "chown", /* 16 = chown */ "break", /* 17 = break */ - "compat4.freebsd32_getfsstat", /* 18 = old freebsd32_getfsstat */ + "compat4.freebsd32_getfsstat", /* 18 = freebsd4 freebsd32_getfsstat */ "obs_olseek", /* 19 = obsolete olseek */ "getpid", /* 20 = getpid */ "mount", /* 21 = mount */ @@ -164,8 +164,8 @@ "#154", /* 154 = nlm_syscall */ "#155", /* 155 = nfssvc */ "obs_ogetdirentries", /* 156 = obsolete ogetdirentries */ - "compat4.freebsd32_statfs", /* 157 = old freebsd32_statfs */ - "compat4.freebsd32_fstatfs", /* 158 = old freebsd32_fstatfs */ + "compat4.freebsd32_statfs", /* 157 = freebsd4 freebsd32_statfs */ + "compat4.freebsd32_fstatfs", /* 158 = freebsd4 freebsd32_fstatfs */ "#159", /* 159 = nosys */ "#160", /* 160 = lgetfh */ "getfh", /* 161 = getfh */ @@ -180,8 +180,8 @@ "freebsd32_msgsys", /* 170 = freebsd32_msgsys */ "freebsd32_shmsys", /* 171 = freebsd32_shmsys */ "#172", /* 172 = nosys */ - "compat6.freebsd32_pread", /* 173 = old freebsd32_pread */ - "compat6.freebsd32_pwrite", /* 174 = old freebsd32_pwrite */ + "compat6.freebsd32_pread", /* 173 = freebsd6 freebsd32_pread */ + "compat6.freebsd32_pwrite", /* 174 = freebsd6 freebsd32_pwrite */ "#175", /* 175 = nosys */ "ntp_adjtime", /* 176 = ntp_adjtime */ "#177", /* 177 = sfork */ @@ -204,11 +204,11 @@ "getrlimit", /* 194 = getrlimit */ "setrlimit", /* 195 = setrlimit */ "freebsd32_getdirentries", /* 196 = freebsd32_getdirentries */ - "compat6.freebsd32_mmap", /* 197 = old freebsd32_mmap */ + "compat6.freebsd32_mmap", /* 197 = freebsd6 freebsd32_mmap */ "__syscall", /* 198 = __syscall */ - "compat6.freebsd32_lseek", /* 199 = old freebsd32_lseek */ - "compat6.freebsd32_truncate", /* 200 = old freebsd32_truncate */ - "compat6.freebsd32_ftruncate", /* 201 = old freebsd32_ftruncate */ + "compat6.freebsd32_lseek", /* 199 = freebsd6 freebsd32_lseek */ + "compat6.freebsd32_truncate", /* 200 = freebsd6 freebsd32_truncate */ + "compat6.freebsd32_ftruncate", /* 201 = freebsd6 freebsd32_ftruncate */ "freebsd32_sysctl", /* 202 = freebsd32_sysctl */ "mlock", /* 203 = mlock */ "munlock", /* 204 = munlock */ @@ -304,7 +304,7 @@ "#294", /* 294 = nosys */ "#295", /* 295 = nosys */ "#296", /* 296 = nosys */ - "compat4.freebsd32_fhstatfs", /* 297 = old freebsd32_fhstatfs */ + "compat4.freebsd32_fhstatfs", /* 297 = freebsd4 freebsd32_fhstatfs */ "fhopen", /* 298 = fhopen */ "fhstat", /* 299 = fhstat */ "modnext", /* 300 = modnext */ @@ -343,15 +343,15 @@ "sched_get_priority_min", /* 333 = sched_get_priority_min */ "sched_rr_get_interval", /* 334 = sched_rr_get_interval */ "utrace", /* 335 = utrace */ - "compat4.freebsd32_sendfile", /* 336 = old freebsd32_sendfile */ + "compat4.freebsd32_sendfile", /* 336 = freebsd4 freebsd32_sendfile */ "kldsym", /* 337 = kldsym */ "freebsd32_jail", /* 338 = freebsd32_jail */ "#339", /* 339 = pioctl */ "sigprocmask", /* 340 = sigprocmask */ "sigsuspend", /* 341 = sigsuspend */ - "compat4.freebsd32_sigaction", /* 342 = old freebsd32_sigaction */ + "compat4.freebsd32_sigaction", /* 342 = freebsd4 freebsd32_sigaction */ "sigpending", /* 343 = sigpending */ - "compat4.freebsd32_sigreturn", /* 344 = old freebsd32_sigreturn */ + "compat4.freebsd32_sigreturn", /* 344 = freebsd4 freebsd32_sigreturn */ "freebsd32_sigtimedwait", /* 345 = freebsd32_sigtimedwait */ "freebsd32_sigwaitinfo", /* 346 = freebsd32_sigwaitinfo */ "__acl_get_file", /* 347 = __acl_get_file */ ==== //depot/projects/smpng/sys/compat/freebsd32/freebsd32_sysent.c#56 (text+ko) ==== @@ -2,8 +2,8 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/freebsd32/freebsd32_sysent.c,v 1.103 2009/06/15 20:40:23 jhb Exp $ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 194262 2009-06-15 20:38:55Z jhb + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_sysent.c,v 1.104 2009/06/17 19:53:47 jhb Exp $ + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 194390 2009-06-17 19:50:38Z jhb */ #include "opt_compat.h" @@ -56,7 +56,7 @@ { AS(chmod_args), (sy_call_t *)chmod, AUE_CHMOD, NULL, 0, 0, 0 }, /* 15 = chmod */ { AS(chown_args), (sy_call_t *)chown, AUE_CHOWN, NULL, 0, 0, 0 }, /* 16 = chown */ { AS(obreak_args), (sy_call_t *)obreak, AUE_NULL, NULL, 0, 0, 0 }, /* 17 = break */ - { compat4(AS(freebsd4_freebsd32_getfsstat_args),freebsd32_getfsstat), AUE_GETFSSTAT, NULL, 0, 0, 0 }, /* 18 = old freebsd32_getfsstat */ + { compat4(AS(freebsd4_freebsd32_getfsstat_args),freebsd32_getfsstat), AUE_GETFSSTAT, NULL, 0, 0, 0 }, /* 18 = freebsd4 freebsd32_getfsstat */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 19 = obsolete olseek */ { 0, (sy_call_t *)getpid, AUE_GETPID, NULL, 0, 0, 0 }, /* 20 = getpid */ { AS(mount_args), (sy_call_t *)mount, AUE_MOUNT, NULL, 0, 0, 0 }, /* 21 = mount */ @@ -195,8 +195,8 @@ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 154 = nlm_syscall */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 155 = nfssvc */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 156 = obsolete ogetdirentries */ - { compat4(AS(freebsd4_freebsd32_statfs_args),freebsd32_statfs), AUE_STATFS, NULL, 0, 0, 0 }, /* 157 = old freebsd32_statfs */ - { compat4(AS(freebsd4_freebsd32_fstatfs_args),freebsd32_fstatfs), AUE_FSTATFS, NULL, 0, 0, 0 }, /* 158 = old freebsd32_fstatfs */ + { compat4(AS(freebsd4_freebsd32_statfs_args),freebsd32_statfs), AUE_STATFS, NULL, 0, 0, 0 }, /* 157 = freebsd4 freebsd32_statfs */ + { compat4(AS(freebsd4_freebsd32_fstatfs_args),freebsd32_fstatfs), AUE_FSTATFS, NULL, 0, 0, 0 }, /* 158 = freebsd4 freebsd32_fstatfs */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 159 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 160 = lgetfh */ { AS(getfh_args), (sy_call_t *)getfh, AUE_NFS_GETFH, NULL, 0, 0, 0 }, /* 161 = getfh */ @@ -211,8 +211,8 @@ { AS(freebsd32_msgsys_args), (sy_call_t *)freebsd32_msgsys, AUE_MSGSYS, NULL, 0, 0, 0 }, /* 170 = freebsd32_msgsys */ { AS(freebsd32_shmsys_args), (sy_call_t *)freebsd32_shmsys, AUE_SHMSYS, NULL, 0, 0, 0 }, /* 171 = freebsd32_shmsys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 172 = nosys */ - { compat6(AS(freebsd6_freebsd32_pread_args),freebsd32_pread), AUE_PREAD, NULL, 0, 0, 0 }, /* 173 = old freebsd32_pread */ - { compat6(AS(freebsd6_freebsd32_pwrite_args),freebsd32_pwrite), AUE_PWRITE, NULL, 0, 0, 0 }, /* 174 = old freebsd32_pwrite */ + { compat6(AS(freebsd6_freebsd32_pread_args),freebsd32_pread), AUE_PREAD, NULL, 0, 0, 0 }, /* 173 = freebsd6 freebsd32_pread */ + { compat6(AS(freebsd6_freebsd32_pwrite_args),freebsd32_pwrite), AUE_PWRITE, NULL, 0, 0, 0 }, /* 174 = freebsd6 freebsd32_pwrite */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 175 = nosys */ { AS(ntp_adjtime_args), (sy_call_t *)ntp_adjtime, AUE_NTP_ADJTIME, NULL, 0, 0, 0 }, /* 176 = ntp_adjtime */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 177 = sfork */ @@ -235,11 +235,11 @@ { AS(__getrlimit_args), (sy_call_t *)getrlimit, AUE_GETRLIMIT, NULL, 0, 0, 0 }, /* 194 = getrlimit */ { AS(__setrlimit_args), (sy_call_t *)setrlimit, AUE_SETRLIMIT, NULL, 0, 0, 0 }, /* 195 = setrlimit */ { AS(freebsd32_getdirentries_args), (sy_call_t *)freebsd32_getdirentries, AUE_GETDIRENTRIES, NULL, 0, 0, 0 }, /* 196 = freebsd32_getdirentries */ - { compat6(AS(freebsd6_freebsd32_mmap_args),freebsd32_mmap), AUE_MMAP, NULL, 0, 0, 0 }, /* 197 = old freebsd32_mmap */ + { compat6(AS(freebsd6_freebsd32_mmap_args),freebsd32_mmap), AUE_MMAP, NULL, 0, 0, 0 }, /* 197 = freebsd6 freebsd32_mmap */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 198 = __syscall */ - { compat6(AS(freebsd6_freebsd32_lseek_args),freebsd32_lseek), AUE_LSEEK, NULL, 0, 0, 0 }, /* 199 = old freebsd32_lseek */ - { compat6(AS(freebsd6_freebsd32_truncate_args),freebsd32_truncate), AUE_TRUNCATE, NULL, 0, 0, 0 }, /* 200 = old freebsd32_truncate */ - { compat6(AS(freebsd6_freebsd32_ftruncate_args),freebsd32_ftruncate), AUE_FTRUNCATE, NULL, 0, 0, 0 }, /* 201 = old freebsd32_ftruncate */ + { compat6(AS(freebsd6_freebsd32_lseek_args),freebsd32_lseek), AUE_LSEEK, NULL, 0, 0, 0 }, /* 199 = freebsd6 freebsd32_lseek */ + { compat6(AS(freebsd6_freebsd32_truncate_args),freebsd32_truncate), AUE_TRUNCATE, NULL, 0, 0, 0 }, /* 200 = freebsd6 freebsd32_truncate */ + { compat6(AS(freebsd6_freebsd32_ftruncate_args),freebsd32_ftruncate), AUE_FTRUNCATE, NULL, 0, 0, 0 }, /* 201 = freebsd6 freebsd32_ftruncate */ { AS(freebsd32_sysctl_args), (sy_call_t *)freebsd32_sysctl, AUE_SYSCTL, NULL, 0, 0, 0 }, /* 202 = freebsd32_sysctl */ { AS(mlock_args), (sy_call_t *)mlock, AUE_MLOCK, NULL, 0, 0, 0 }, /* 203 = mlock */ { AS(munlock_args), (sy_call_t *)munlock, AUE_MUNLOCK, NULL, 0, 0, 0 }, /* 204 = munlock */ @@ -335,7 +335,7 @@ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 294 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 295 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 296 = nosys */ - { compat4(AS(freebsd4_freebsd32_fhstatfs_args),freebsd32_fhstatfs), AUE_FHSTATFS, NULL, 0, 0, 0 }, /* 297 = old freebsd32_fhstatfs */ + { compat4(AS(freebsd4_freebsd32_fhstatfs_args),freebsd32_fhstatfs), AUE_FHSTATFS, NULL, 0, 0, 0 }, /* 297 = freebsd4 freebsd32_fhstatfs */ { AS(fhopen_args), (sy_call_t *)fhopen, AUE_FHOPEN, NULL, 0, 0, 0 }, /* 298 = fhopen */ { AS(fhstat_args), (sy_call_t *)fhstat, AUE_FHSTAT, NULL, 0, 0, 0 }, /* 299 = fhstat */ { AS(modnext_args), (sy_call_t *)modnext, AUE_NULL, NULL, 0, 0, 0 }, /* 300 = modnext */ @@ -374,15 +374,15 @@ { AS(sched_get_priority_min_args), (sy_call_t *)sched_get_priority_min, AUE_NULL, NULL, 0, 0, 0 }, /* 333 = sched_get_priority_min */ { AS(sched_rr_get_interval_args), (sy_call_t *)sched_rr_get_interval, AUE_NULL, NULL, 0, 0, 0 }, /* 334 = sched_rr_get_interval */ { AS(utrace_args), (sy_call_t *)utrace, AUE_NULL, NULL, 0, 0, 0 }, /* 335 = utrace */ - { compat4(AS(freebsd4_freebsd32_sendfile_args),freebsd32_sendfile), AUE_SENDFILE, NULL, 0, 0, 0 }, /* 336 = old freebsd32_sendfile */ + { compat4(AS(freebsd4_freebsd32_sendfile_args),freebsd32_sendfile), AUE_SENDFILE, NULL, 0, 0, 0 }, /* 336 = freebsd4 freebsd32_sendfile */ { AS(kldsym_args), (sy_call_t *)kldsym, AUE_NULL, NULL, 0, 0, 0 }, /* 337 = kldsym */ { AS(freebsd32_jail_args), (sy_call_t *)freebsd32_jail, AUE_JAIL, NULL, 0, 0, 0 }, /* 338 = freebsd32_jail */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 339 = pioctl */ { AS(sigprocmask_args), (sy_call_t *)sigprocmask, AUE_SIGPROCMASK, NULL, 0, 0, 0 }, /* 340 = sigprocmask */ { AS(sigsuspend_args), (sy_call_t *)sigsuspend, AUE_SIGSUSPEND, NULL, 0, 0, 0 }, /* 341 = sigsuspend */ - { compat4(AS(freebsd4_freebsd32_sigaction_args),freebsd32_sigaction), AUE_SIGACTION, NULL, 0, 0, 0 }, /* 342 = old freebsd32_sigaction */ + { compat4(AS(freebsd4_freebsd32_sigaction_args),freebsd32_sigaction), AUE_SIGACTION, NULL, 0, 0, 0 }, /* 342 = freebsd4 freebsd32_sigaction */ { AS(sigpending_args), (sy_call_t *)sigpending, AUE_SIGPENDING, NULL, 0, 0, 0 }, /* 343 = sigpending */ - { compat4(AS(freebsd4_freebsd32_sigreturn_args),freebsd32_sigreturn), AUE_SIGRETURN, NULL, 0, 0, 0 }, /* 344 = old freebsd32_sigreturn */ + { compat4(AS(freebsd4_freebsd32_sigreturn_args),freebsd32_sigreturn), AUE_SIGRETURN, NULL, 0, 0, 0 }, /* 344 = freebsd4 freebsd32_sigreturn */ { AS(freebsd32_sigtimedwait_args), (sy_call_t *)freebsd32_sigtimedwait, AUE_SIGWAIT, NULL, 0, 0, 0 }, /* 345 = freebsd32_sigtimedwait */ { AS(freebsd32_sigwaitinfo_args), (sy_call_t *)freebsd32_sigwaitinfo, AUE_NULL, NULL, 0, 0, 0 }, /* 346 = freebsd32_sigwaitinfo */ { AS(__acl_get_file_args), (sy_call_t *)__acl_get_file, AUE_NULL, NULL, 0, 0, 0 }, /* 347 = __acl_get_file */ ==== //depot/projects/smpng/sys/compat/freebsd32/syscalls.master#59 (text+ko) ==== @@ -1,19 +1,21 @@ - $FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.117 2009/06/15 20:38:55 jhb Exp $ + $FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.118 2009/06/17 19:50:38 jhb Exp $ ; from: @(#)syscalls.master 8.2 (Berkeley) 1/13/94 ; from: src/sys/kern/syscalls.master 1.107 ; ; System call name/number master file. ; Processed to created init_sysent.c, syscalls.c and syscall.h. -; Columns: number audit type nargs name alt{name,tag,rtyp}/comments +; Columns: number audit type name alt{name,tag,rtyp}/comments ; number system call number, must be in order ; audit the audit event associated with the system call ; A value of AUE_NULL means no auditing, but it also means that ; there is no audit event for the call at this time. For the ; case where the event exists, but we don't want auditing, the ; event should be #defined to AUE_NULL in audit_kevents.h. -; type one of STD, OBSOL, UNIMPL, COMPAT, CPT_NOA, LIBCOMPAT, -; NODEF, NOARGS, NOPROTO, NOIMPL, NOSTD, COMPAT4 +; type one of STD, OBSOL, UNIMPL, COMPAT, COMPAT4, COMPAT6, +; LIBCOMPAT, NODEF, NOARGS, NOPROTO, NOSTD +; The COMPAT* options may be combined with one or more NO* +; options separated by '|' with no spaces (e.g. COMPAT|NOARGS) ; name psuedo-prototype of syscall routine ; If one of the following alts is different, then all appear: ; altname name of system call if different @@ -25,11 +27,12 @@ ; STD always included ; COMPAT included on COMPAT #ifdef ; COMPAT4 included on COMPAT4 #ifdef (FreeBSD 4 compat) +; COMPAT6 included on COMPAT4 #ifdef (FreeBSD 6 compat) ; LIBCOMPAT included on COMPAT #ifdef, and placed in syscall.h ; OBSOL obsolete, not included in system, only specifies name ; UNIMPL not implemented, placeholder only ; NOSTD implemented but as a lkm that can be statically -; compiled in; sysent entry will be filled with lkmsys +; compiled in; sysent entry will be filled with lkmressys ; so the SYSCALL_MODULE macro works ; NOARGS same as STD except do not create structure in sys/sysproto.h ; NODEF same as STD except only have the entry in the syscall table ==== //depot/projects/smpng/sys/compat/linux/linux_ioctl.c#60 (text+ko) ==== @@ -29,7 +29,7 @@ #include "opt_compat.h" #include -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_ioctl.c,v 1.151 2009/06/15 19:01:53 jamie Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_ioctl.c,v 1.152 2009/06/17 15:01:01 bz Exp $"); #include #include @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include ==== //depot/projects/smpng/sys/fs/nfsclient/nfs_clvnops.c#6 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/fs/nfsclient/nfs_clvnops.c,v 1.5 2009/06/09 15:18:01 rmacklem Exp $"); +__FBSDID("$FreeBSD: src/sys/fs/nfsclient/nfs_clvnops.c,v 1.7 2009/06/17 15:01:01 bz Exp $"); /* * vnode op calls for Sun NFS version 2, 3 and 4 @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -992,22 +993,23 @@ struct componentname *cnp = ap->a_cnp; struct vnode *dvp = ap->a_dvp; struct vnode **vpp = ap->a_vpp; + struct mount *mp = dvp->v_mount; int flags = cnp->cn_flags; struct vnode *newvp; struct nfsmount *nmp; struct nfsnode *np; - int error = 0, attrflag, dattrflag; + int error = 0, attrflag, dattrflag, ltype; struct thread *td = cnp->cn_thread; struct nfsfh *nfhp; struct nfsvattr dnfsva, nfsva; *vpp = NULLVP; - if ((flags & ISLASTCN) && (dvp->v_mount->mnt_flag & MNT_RDONLY) && + if ((flags & ISLASTCN) && (mp->mnt_flag & MNT_RDONLY) && (cnp->cn_nameiop == DELETE || cnp->cn_nameiop == RENAME)) return (EROFS); if (dvp->v_type != VDIR) return (ENOTDIR); - nmp = VFSTONFS(dvp->v_mount); + nmp = VFSTONFS(mp); np = VTONFS(dvp); /* For NFSv4, wait until any remove is done. */ @@ -1073,7 +1075,7 @@ } if ((cnp->cn_nameiop == CREATE || cnp->cn_nameiop == RENAME) && (flags & ISLASTCN) && error == ENOENT) { - if (dvp->v_mount->mnt_flag & MNT_RDONLY) + if (mp->mnt_flag & MNT_RDONLY) error = EROFS; else error = EJUSTRETURN; @@ -1093,8 +1095,7 @@ FREE((caddr_t)nfhp, M_NFSFH); return (EISDIR); } - error = nfscl_nget(dvp->v_mount, dvp, nfhp, cnp, td, &np, - NULL); + error = nfscl_nget(mp, dvp, nfhp, cnp, td, &np, NULL); if (error) return (error); newvp = NFSTOV(np); @@ -1106,14 +1107,37 @@ return (0); } - if ((flags & ISDOTDOT)) { + if (flags & ISDOTDOT) { + ltype = VOP_ISLOCKED(dvp); + error = vfs_busy(mp, MBF_NOWAIT); + if (error != 0) { + VOP_UNLOCK(dvp, 0); + error = vfs_busy(mp, 0); + vn_lock(dvp, ltype | LK_RETRY); + if (error == 0 && (dvp->v_iflag & VI_DOOMED)) { + vfs_unbusy(mp); + error = ENOENT; + } + if (error != 0) + return (error); + } VOP_UNLOCK(dvp, 0); - error = nfscl_nget(dvp->v_mount, dvp, nfhp, cnp, td, &np, - NULL); - vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY); - if (error) + error = nfscl_nget(mp, dvp, nfhp, cnp, td, &np, NULL); + if (error == 0) + newvp = NFSTOV(np); + vfs_unbusy(mp); + vn_lock(dvp, ltype | LK_RETRY); + if (dvp->v_iflag & VI_DOOMED) { + if (error == 0) { + if (newvp == dvp) + vrele(newvp); + else + vput(newvp); + } + error = ENOENT; + } + if (error != 0) return (error); - newvp = NFSTOV(np); if (attrflag) (void) nfscl_loadattrcache(&newvp, &nfsva, NULL, NULL, 0, 1); @@ -1125,8 +1149,7 @@ (void) nfscl_loadattrcache(&newvp, &nfsva, NULL, NULL, 0, 1); } else { - error = nfscl_nget(dvp->v_mount, dvp, nfhp, cnp, td, &np, - NULL); + error = nfscl_nget(mp, dvp, nfhp, cnp, td, &np, NULL); if (error) return (error); newvp = NFSTOV(np); ==== //depot/projects/smpng/sys/i386/ibcs2/ibcs2_isc_sysent.c#12 (text+ko) ==== @@ -2,7 +2,7 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/i386/ibcs2/ibcs2_isc_sysent.c,v 1.19 2009/05/08 20:16:04 ed Exp $ + * $FreeBSD: src/sys/i386/ibcs2/ibcs2_isc_sysent.c,v 1.20 2009/06/17 19:53:20 jhb Exp $ * created from FreeBSD: head/sys/i386/ibcs2/syscalls.isc 160798 2006-07-28 19:05:28Z jhb */ @@ -18,25 +18,25 @@ /* The casts are bogus but will do for now. */ struct sysent isc_sysent[] = { - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 0 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 1 = isc_setostype */ - { AS(ibcs2_rename_args), (sy_call_t *)ibcs2_rename, AUE_RENAME, NULL, 0, 0 }, /* 2 = ibcs2_rename */ - { AS(ibcs2_sigaction_args), (sy_call_t *)ibcs2_sigaction, AUE_NULL, NULL, 0, 0 }, /* 3 = ibcs2_sigaction */ - { AS(ibcs2_sigprocmask_args), (sy_call_t *)ibcs2_sigprocmask, AUE_NULL, NULL, 0, 0 }, /* 4 = ibcs2_sigprocmask */ - { AS(ibcs2_sigpending_args), (sy_call_t *)ibcs2_sigpending, AUE_NULL, NULL, 0, 0 }, /* 5 = ibcs2_sigpending */ - { AS(getgroups_args), (sy_call_t *)getgroups, AUE_GETGROUPS, NULL, 0, 0 }, /* 6 = getgroups */ - { AS(setgroups_args), (sy_call_t *)setgroups, AUE_SETGROUPS, NULL, 0, 0 }, /* 7 = setgroups */ - { AS(ibcs2_pathconf_args), (sy_call_t *)ibcs2_pathconf, AUE_PATHCONF, NULL, 0, 0 }, /* 8 = ibcs2_pathconf */ - { AS(ibcs2_fpathconf_args), (sy_call_t *)ibcs2_fpathconf, AUE_FPATHCONF, NULL, 0, 0 }, /* 9 = ibcs2_fpathconf */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 10 = nosys */ - { AS(ibcs2_wait_args), (sy_call_t *)ibcs2_wait, AUE_WAIT4, NULL, 0, 0 }, /* 11 = ibcs2_wait */ - { 0, (sy_call_t *)setsid, AUE_SETSID, NULL, 0, 0 }, /* 12 = setsid */ - { 0, (sy_call_t *)getpid, AUE_GETPID, NULL, 0, 0 }, /* 13 = getpid */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 14 = isc_adduser */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 15 = isc_setuser */ - { AS(ibcs2_sysconf_args), (sy_call_t *)ibcs2_sysconf, AUE_NULL, NULL, 0, 0 }, /* 16 = ibcs2_sysconf */ - { AS(ibcs2_sigsuspend_args), (sy_call_t *)ibcs2_sigsuspend, AUE_NULL, NULL, 0, 0 }, /* 17 = ibcs2_sigsuspend */ - { AS(ibcs2_symlink_args), (sy_call_t *)ibcs2_symlink, AUE_SYMLINK, NULL, 0, 0 }, /* 18 = ibcs2_symlink */ - { AS(ibcs2_readlink_args), (sy_call_t *)ibcs2_readlink, AUE_READLINK, NULL, 0, 0 }, /* 19 = ibcs2_readlink */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 20 = isc_getmajor */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 0 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 1 = isc_setostype */ + { AS(ibcs2_rename_args), (sy_call_t *)ibcs2_rename, AUE_RENAME, NULL, 0, 0, 0 }, /* 2 = ibcs2_rename */ + { AS(ibcs2_sigaction_args), (sy_call_t *)ibcs2_sigaction, AUE_NULL, NULL, 0, 0, 0 }, /* 3 = ibcs2_sigaction */ + { AS(ibcs2_sigprocmask_args), (sy_call_t *)ibcs2_sigprocmask, AUE_NULL, NULL, 0, 0, 0 }, /* 4 = ibcs2_sigprocmask */ + { AS(ibcs2_sigpending_args), (sy_call_t *)ibcs2_sigpending, AUE_NULL, NULL, 0, 0, 0 }, /* 5 = ibcs2_sigpending */ + { AS(getgroups_args), (sy_call_t *)getgroups, AUE_GETGROUPS, NULL, 0, 0, 0 }, /* 6 = getgroups */ + { AS(setgroups_args), (sy_call_t *)setgroups, AUE_SETGROUPS, NULL, 0, 0, 0 }, /* 7 = setgroups */ + { AS(ibcs2_pathconf_args), (sy_call_t *)ibcs2_pathconf, AUE_PATHCONF, NULL, 0, 0, 0 }, /* 8 = ibcs2_pathconf */ + { AS(ibcs2_fpathconf_args), (sy_call_t *)ibcs2_fpathconf, AUE_FPATHCONF, NULL, 0, 0, 0 }, /* 9 = ibcs2_fpathconf */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 10 = nosys */ + { AS(ibcs2_wait_args), (sy_call_t *)ibcs2_wait, AUE_WAIT4, NULL, 0, 0, 0 }, /* 11 = ibcs2_wait */ + { 0, (sy_call_t *)setsid, AUE_SETSID, NULL, 0, 0, 0 }, /* 12 = setsid */ + { 0, (sy_call_t *)getpid, AUE_GETPID, NULL, 0, 0, 0 }, /* 13 = getpid */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 14 = isc_adduser */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 15 = isc_setuser */ + { AS(ibcs2_sysconf_args), (sy_call_t *)ibcs2_sysconf, AUE_NULL, NULL, 0, 0, 0 }, /* 16 = ibcs2_sysconf */ + { AS(ibcs2_sigsuspend_args), (sy_call_t *)ibcs2_sigsuspend, AUE_NULL, NULL, 0, 0, 0 }, /* 17 = ibcs2_sigsuspend */ + { AS(ibcs2_symlink_args), (sy_call_t *)ibcs2_symlink, AUE_SYMLINK, NULL, 0, 0, 0 }, /* 18 = ibcs2_symlink */ + { AS(ibcs2_readlink_args), (sy_call_t *)ibcs2_readlink, AUE_READLINK, NULL, 0, 0, 0 }, /* 19 = ibcs2_readlink */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 20 = isc_getmajor */ }; ==== //depot/projects/smpng/sys/i386/ibcs2/ibcs2_xenix_sysent.c#14 (text+ko) ==== @@ -2,7 +2,7 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/i386/ibcs2/ibcs2_xenix_sysent.c,v 1.20 2009/05/08 20:16:04 ed Exp $ + * $FreeBSD: src/sys/i386/ibcs2/ibcs2_xenix_sysent.c,v 1.21 2009/06/17 19:53:20 jhb Exp $ * created from FreeBSD: head/sys/i386/ibcs2/syscalls.xenix 160798 2006-07-28 19:05:28Z jhb */ @@ -17,61 +17,61 @@ /* The casts are bogus but will do for now. */ struct sysent xenix_sysent[] = { - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 0 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 1 = xenix_xlocking */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 2 = xenix_creatsem */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 3 = xenix_opensem */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 4 = xenix_sigsem */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 5 = xenix_waitsem */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 6 = xenix_nbwaitsem */ - { AS(xenix_rdchk_args), (sy_call_t *)xenix_rdchk, AUE_NULL, NULL, 0, 0 }, /* 7 = xenix_rdchk */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 8 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 9 = nosys */ - { AS(xenix_chsize_args), (sy_call_t *)xenix_chsize, AUE_FTRUNCATE, NULL, 0, 0 }, /* 10 = xenix_chsize */ - { AS(xenix_ftime_args), (sy_call_t *)xenix_ftime, AUE_NULL, NULL, 0, 0 }, /* 11 = xenix_ftime */ - { AS(xenix_nap_args), (sy_call_t *)xenix_nap, AUE_NULL, NULL, 0, 0 }, /* 12 = xenix_nap */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 13 = xenix_sdget */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 14 = xenix_sdfree */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 15 = xenix_sdenter */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 16 = xenix_sdleave */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 17 = xenix_sdgetv */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 18 = xenix_sdwaitv */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 19 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 20 = nosys */ - { 0, (sy_call_t *)xenix_scoinfo, AUE_NULL, NULL, 0, 0 }, /* 21 = xenix_scoinfo */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 22 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 23 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 24 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 25 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 26 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 27 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 28 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 29 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 30 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 31 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 32 = xenix_proctl */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 33 = xenix_execseg */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 34 = xenix_unexecseg */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 35 = nosys */ - { AS(select_args), (sy_call_t *)select, AUE_SELECT, NULL, 0, 0 }, /* 36 = select */ - { AS(xenix_eaccess_args), (sy_call_t *)xenix_eaccess, AUE_EACCESS, NULL, 0, 0 }, /* 37 = xenix_eaccess */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 38 = xenix_paccess */ - { AS(ibcs2_sigaction_args), (sy_call_t *)ibcs2_sigaction, AUE_NULL, NULL, 0, 0 }, /* 39 = ibcs2_sigaction */ - { AS(ibcs2_sigprocmask_args), (sy_call_t *)ibcs2_sigprocmask, AUE_NULL, NULL, 0, 0 }, /* 40 = ibcs2_sigprocmask */ - { AS(ibcs2_sigpending_args), (sy_call_t *)ibcs2_sigpending, AUE_NULL, NULL, 0, 0 }, /* 41 = ibcs2_sigpending */ - { AS(ibcs2_sigsuspend_args), (sy_call_t *)ibcs2_sigsuspend, AUE_NULL, NULL, 0, 0 }, /* 42 = ibcs2_sigsuspend */ - { AS(ibcs2_getgroups_args), (sy_call_t *)ibcs2_getgroups, AUE_GETGROUPS, NULL, 0, 0 }, /* 43 = ibcs2_getgroups */ - { AS(ibcs2_setgroups_args), (sy_call_t *)ibcs2_setgroups, AUE_SETGROUPS, NULL, 0, 0 }, /* 44 = ibcs2_setgroups */ - { AS(ibcs2_sysconf_args), (sy_call_t *)ibcs2_sysconf, AUE_NULL, NULL, 0, 0 }, /* 45 = ibcs2_sysconf */ - { AS(ibcs2_pathconf_args), (sy_call_t *)ibcs2_pathconf, AUE_PATHCONF, NULL, 0, 0 }, /* 46 = ibcs2_pathconf */ - { AS(ibcs2_fpathconf_args), (sy_call_t *)ibcs2_fpathconf, AUE_FPATHCONF, NULL, 0, 0 }, /* 47 = ibcs2_fpathconf */ - { AS(ibcs2_rename_args), (sy_call_t *)ibcs2_rename, AUE_RENAME, NULL, 0, 0 }, /* 48 = ibcs2_rename */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 49 = nosys */ - { AS(xenix_utsname_args), (sy_call_t *)xenix_utsname, AUE_NULL, NULL, 0, 0 }, /* 50 = xenix_utsname */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 51 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 52 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 53 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 54 = nosys */ - { AS(getitimer_args), (sy_call_t *)getitimer, AUE_GETITIMER, NULL, 0, 0 }, /* 55 = getitimer */ - { AS(setitimer_args), (sy_call_t *)setitimer, AUE_SETITIMER, NULL, 0, 0 }, /* 56 = setitimer */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 0 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 1 = xenix_xlocking */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 2 = xenix_creatsem */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 3 = xenix_opensem */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 4 = xenix_sigsem */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 5 = xenix_waitsem */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 6 = xenix_nbwaitsem */ + { AS(xenix_rdchk_args), (sy_call_t *)xenix_rdchk, AUE_NULL, NULL, 0, 0, 0 }, /* 7 = xenix_rdchk */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 8 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 9 = nosys */ + { AS(xenix_chsize_args), (sy_call_t *)xenix_chsize, AUE_FTRUNCATE, NULL, 0, 0, 0 }, /* 10 = xenix_chsize */ + { AS(xenix_ftime_args), (sy_call_t *)xenix_ftime, AUE_NULL, NULL, 0, 0, 0 }, /* 11 = xenix_ftime */ + { AS(xenix_nap_args), (sy_call_t *)xenix_nap, AUE_NULL, NULL, 0, 0, 0 }, /* 12 = xenix_nap */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 13 = xenix_sdget */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 14 = xenix_sdfree */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 15 = xenix_sdenter */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 16 = xenix_sdleave */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 17 = xenix_sdgetv */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 18 = xenix_sdwaitv */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 19 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 20 = nosys */ + { 0, (sy_call_t *)xenix_scoinfo, AUE_NULL, NULL, 0, 0, 0 }, /* 21 = xenix_scoinfo */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 22 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 23 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 24 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 25 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 26 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 27 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 28 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 29 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 30 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 31 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 32 = xenix_proctl */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 33 = xenix_execseg */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 34 = xenix_unexecseg */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 35 = nosys */ + { AS(select_args), (sy_call_t *)select, AUE_SELECT, NULL, 0, 0, 0 }, /* 36 = select */ + { AS(xenix_eaccess_args), (sy_call_t *)xenix_eaccess, AUE_EACCESS, NULL, 0, 0, 0 }, /* 37 = xenix_eaccess */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 38 = xenix_paccess */ + { AS(ibcs2_sigaction_args), (sy_call_t *)ibcs2_sigaction, AUE_NULL, NULL, 0, 0, 0 }, /* 39 = ibcs2_sigaction */ + { AS(ibcs2_sigprocmask_args), (sy_call_t *)ibcs2_sigprocmask, AUE_NULL, NULL, 0, 0, 0 }, /* 40 = ibcs2_sigprocmask */ + { AS(ibcs2_sigpending_args), (sy_call_t *)ibcs2_sigpending, AUE_NULL, NULL, 0, 0, 0 }, /* 41 = ibcs2_sigpending */ + { AS(ibcs2_sigsuspend_args), (sy_call_t *)ibcs2_sigsuspend, AUE_NULL, NULL, 0, 0, 0 }, /* 42 = ibcs2_sigsuspend */ + { AS(ibcs2_getgroups_args), (sy_call_t *)ibcs2_getgroups, AUE_GETGROUPS, NULL, 0, 0, 0 }, /* 43 = ibcs2_getgroups */ + { AS(ibcs2_setgroups_args), (sy_call_t *)ibcs2_setgroups, AUE_SETGROUPS, NULL, 0, 0, 0 }, /* 44 = ibcs2_setgroups */ + { AS(ibcs2_sysconf_args), (sy_call_t *)ibcs2_sysconf, AUE_NULL, NULL, 0, 0, 0 }, /* 45 = ibcs2_sysconf */ + { AS(ibcs2_pathconf_args), (sy_call_t *)ibcs2_pathconf, AUE_PATHCONF, NULL, 0, 0, 0 }, /* 46 = ibcs2_pathconf */ + { AS(ibcs2_fpathconf_args), (sy_call_t *)ibcs2_fpathconf, AUE_FPATHCONF, NULL, 0, 0, 0 }, /* 47 = ibcs2_fpathconf */ + { AS(ibcs2_rename_args), (sy_call_t *)ibcs2_rename, AUE_RENAME, NULL, 0, 0, 0 }, /* 48 = ibcs2_rename */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 49 = nosys */ + { AS(xenix_utsname_args), (sy_call_t *)xenix_utsname, AUE_NULL, NULL, 0, 0, 0 }, /* 50 = xenix_utsname */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 51 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 52 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 53 = nosys */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 54 = nosys */ + { AS(getitimer_args), (sy_call_t *)getitimer, AUE_GETITIMER, NULL, 0, 0, 0 }, /* 55 = getitimer */ + { AS(setitimer_args), (sy_call_t *)setitimer, AUE_SETITIMER, NULL, 0, 0, 0 }, /* 56 = setitimer */ }; ==== //depot/projects/smpng/sys/kern/init_sysent.c#92 (text+ko) ==== @@ -2,8 +2,8 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/kern/init_sysent.c,v 1.249 2009/06/15 20:40:23 jhb Exp $ - * created from FreeBSD: head/sys/kern/syscalls.master 194262 2009-06-15 20:38:55Z jhb + * $FreeBSD: src/sys/kern/init_sysent.c,v 1.250 2009/06/17 19:53:47 jhb Exp $ + * created from FreeBSD: head/sys/kern/syscalls.master 194390 2009-06-17 19:50:38Z jhb */ #include "opt_compat.h" @@ -46,7 +46,7 @@ { AS(chmod_args), (sy_call_t *)chmod, AUE_CHMOD, NULL, 0, 0, 0 }, /* 15 = chmod */ { AS(chown_args), (sy_call_t *)chown, AUE_CHOWN, NULL, 0, 0, 0 }, /* 16 = chown */ { AS(obreak_args), (sy_call_t *)obreak, AUE_NULL, NULL, 0, 0, 0 }, /* 17 = break */ - { compat4(AS(freebsd4_getfsstat_args),getfsstat), AUE_GETFSSTAT, NULL, 0, 0, 0 }, /* 18 = old getfsstat */ + { compat4(AS(freebsd4_getfsstat_args),getfsstat), AUE_GETFSSTAT, NULL, 0, 0, 0 }, /* 18 = freebsd4 getfsstat */ { compat(AS(olseek_args),lseek), AUE_LSEEK, NULL, 0, 0, 0 }, /* 19 = old lseek */ { 0, (sy_call_t *)getpid, AUE_GETPID, NULL, 0, 0, 0 }, /* 20 = getpid */ { AS(mount_args), (sy_call_t *)mount, AUE_MOUNT, NULL, 0, 0, 0 }, /* 21 = mount */ @@ -185,14 +185,14 @@ { AS(nlm_syscall_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 154 = nlm_syscall */ { AS(nfssvc_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 155 = nfssvc */ { compat(AS(ogetdirentries_args),getdirentries), AUE_GETDIRENTRIES, NULL, 0, 0, 0 }, /* 156 = old getdirentries */ - { compat4(AS(freebsd4_statfs_args),statfs), AUE_STATFS, NULL, 0, 0, 0 }, /* 157 = old statfs */ - { compat4(AS(freebsd4_fstatfs_args),fstatfs), AUE_FSTATFS, NULL, 0, 0, 0 }, /* 158 = old fstatfs */ + { compat4(AS(freebsd4_statfs_args),statfs), AUE_STATFS, NULL, 0, 0, 0 }, /* 157 = freebsd4 statfs */ + { compat4(AS(freebsd4_fstatfs_args),fstatfs), AUE_FSTATFS, NULL, 0, 0, 0 }, /* 158 = freebsd4 fstatfs */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 159 = nosys */ { AS(lgetfh_args), (sy_call_t *)lgetfh, AUE_LGETFH, NULL, 0, 0, 0 }, /* 160 = lgetfh */ { AS(getfh_args), (sy_call_t *)getfh, AUE_NFS_GETFH, NULL, 0, 0, 0 }, /* 161 = getfh */ - { compat4(AS(freebsd4_getdomainname_args),getdomainname), AUE_SYSCTL, NULL, 0, 0, 0 }, /* 162 = old getdomainname */ - { compat4(AS(freebsd4_setdomainname_args),setdomainname), AUE_SYSCTL, NULL, 0, 0, 0 }, /* 163 = old setdomainname */ - { compat4(AS(freebsd4_uname_args),uname), AUE_NULL, NULL, 0, 0, 0 }, /* 164 = old uname */ + { compat4(AS(freebsd4_getdomainname_args),getdomainname), AUE_SYSCTL, NULL, 0, 0, 0 }, /* 162 = freebsd4 getdomainname */ + { compat4(AS(freebsd4_setdomainname_args),setdomainname), AUE_SYSCTL, NULL, 0, 0, 0 }, /* 163 = freebsd4 setdomainname */ + { compat4(AS(freebsd4_uname_args),uname), AUE_NULL, NULL, 0, 0, 0 }, /* 164 = freebsd4 uname */ { AS(sysarch_args), (sy_call_t *)sysarch, AUE_SYSARCH, NULL, 0, 0, 0 }, /* 165 = sysarch */ { AS(rtprio_args), (sy_call_t *)rtprio, AUE_RTPRIO, NULL, 0, 0, 0 }, /* 166 = rtprio */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 167 = nosys */ @@ -325,7 +325,7 @@ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 294 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 295 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 296 = nosys */ - { compat4(AS(freebsd4_fhstatfs_args),fhstatfs), AUE_FHSTATFS, NULL, 0, 0, 0 }, /* 297 = old fhstatfs */ + { compat4(AS(freebsd4_fhstatfs_args),fhstatfs), AUE_FHSTATFS, NULL, 0, 0, 0 }, /* 297 = freebsd4 fhstatfs */ { AS(fhopen_args), (sy_call_t *)fhopen, AUE_FHOPEN, NULL, 0, 0, 0 }, /* 298 = fhopen */ { AS(fhstat_args), (sy_call_t *)fhstat, AUE_FHSTAT, NULL, 0, 0, 0 }, /* 299 = fhstat */ { AS(modnext_args), (sy_call_t *)modnext, AUE_NULL, NULL, 0, 0, 0 }, /* 300 = modnext */ @@ -364,15 +364,15 @@ { AS(sched_get_priority_min_args), (sy_call_t *)sched_get_priority_min, AUE_NULL, NULL, 0, 0, 0 }, /* 333 = sched_get_priority_min */ { AS(sched_rr_get_interval_args), (sy_call_t *)sched_rr_get_interval, AUE_NULL, NULL, 0, 0, 0 }, /* 334 = sched_rr_get_interval */ { AS(utrace_args), (sy_call_t *)utrace, AUE_NULL, NULL, 0, 0, 0 }, /* 335 = utrace */ - { compat4(AS(freebsd4_sendfile_args),sendfile), AUE_SENDFILE, NULL, 0, 0, 0 }, /* 336 = old sendfile */ + { compat4(AS(freebsd4_sendfile_args),sendfile), AUE_SENDFILE, NULL, 0, 0, 0 }, /* 336 = freebsd4 sendfile */ { AS(kldsym_args), (sy_call_t *)kldsym, AUE_NULL, NULL, 0, 0, 0 }, /* 337 = kldsym */ { AS(jail_args), (sy_call_t *)jail, AUE_JAIL, NULL, 0, 0, 0 }, /* 338 = jail */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 339 = pioctl */ { AS(sigprocmask_args), (sy_call_t *)sigprocmask, AUE_SIGPROCMASK, NULL, 0, 0, 0 }, /* 340 = sigprocmask */ { AS(sigsuspend_args), (sy_call_t *)sigsuspend, AUE_SIGSUSPEND, NULL, 0, 0, 0 }, /* 341 = sigsuspend */ - { compat4(AS(freebsd4_sigaction_args),sigaction), AUE_SIGACTION, NULL, 0, 0, 0 }, /* 342 = old sigaction */ + { compat4(AS(freebsd4_sigaction_args),sigaction), AUE_SIGACTION, NULL, 0, 0, 0 }, /* 342 = freebsd4 sigaction */ { AS(sigpending_args), (sy_call_t *)sigpending, AUE_SIGPENDING, NULL, 0, 0, 0 }, /* 343 = sigpending */ - { compat4(AS(freebsd4_sigreturn_args),sigreturn), AUE_SIGRETURN, NULL, 0, 0, 0 }, /* 344 = old sigreturn */ + { compat4(AS(freebsd4_sigreturn_args),sigreturn), AUE_SIGRETURN, NULL, 0, 0, 0 }, /* 344 = freebsd4 sigreturn */ { AS(sigtimedwait_args), (sy_call_t *)sigtimedwait, AUE_SIGWAIT, NULL, 0, 0, 0 }, /* 345 = sigtimedwait */ { AS(sigwaitinfo_args), (sy_call_t *)sigwaitinfo, AUE_NULL, NULL, 0, 0, 0 }, /* 346 = sigwaitinfo */ { AS(__acl_get_file_args), (sy_call_t *)__acl_get_file, AUE_NULL, NULL, 0, 0, 0 }, /* 347 = __acl_get_file */ @@ -403,7 +403,7 @@ { AS(extattr_get_fd_args), (sy_call_t *)extattr_get_fd, AUE_EXTATTR_GET_FD, NULL, 0, 0, 0 }, /* 372 = extattr_get_fd */ { AS(extattr_delete_fd_args), (sy_call_t *)extattr_delete_fd, AUE_EXTATTR_DELETE_FD, NULL, 0, 0, 0 }, /* 373 = extattr_delete_fd */ { AS(__setugid_args), (sy_call_t *)__setugid, AUE_NULL, NULL, 0, 0, 0 }, /* 374 = __setugid */ - { AS(nfsclnt_args), (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 375 = nfsclnt */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 375 = nfsclnt */ { AS(eaccess_args), (sy_call_t *)eaccess, AUE_EACCESS, NULL, 0, 0, 0 }, /* 376 = eaccess */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 377 = afs_syscall */ { AS(nmount_args), (sy_call_t *)nmount, AUE_NMOUNT, NULL, 0, 0, 0 }, /* 378 = nmount */ ==== //depot/projects/smpng/sys/kern/kern_sysctl.c#66 (text+ko) ==== @@ -36,7 +36,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_sysctl.c,v 1.197 2009/06/15 19:01:53 jamie Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_sysctl.c,v 1.198 2009/06/17 15:01:01 bz Exp $"); #include "opt_compat.h" #include "opt_ktrace.h" @@ -48,6 +48,7 @@ #include #include #include +#include #include #include #include ==== //depot/projects/smpng/sys/kern/makesyscalls.sh#28 (text+ko) ==== @@ -1,6 +1,6 @@ #! /bin/sh - # @(#)makesyscalls.sh 8.1 (Berkeley) 6/10/93 -# $FreeBSD: src/sys/kern/makesyscalls.sh,v 1.72 2009/06/01 16:13:06 rwatson Exp $ +# $FreeBSD: src/sys/kern/makesyscalls.sh,v 1.74 2009/06/17 19:50:38 jhb Exp $ set -e @@ -213,6 +213,19 @@ print exit 1 } + # Returns true if the type "name" is the first flag in the type field + function type(name, flags, n) { + n = split($3, flags, /\|/) + return (n > 0 && flags[1] == name) + } + # Returns true if the flag "name" is set in the type field + function flag(name, flags, i, n) { + n = split($3, flags, /\|/) + for (i = 1; i <= n; i++) + if (flags[i] == name) + return 1 + return 0 + } function align_sysent_comment(column) { printf("\t") > sysent column = column + 8 - column % 8 @@ -241,7 +254,7 @@ rettype="int" end=NF } - if ($3 == "NODEF") { + if (flag("NODEF")) { auditev="AUE_NULL" funcname=$4 argssize = "AS(" $6 ")" @@ -267,11 +280,11 @@ funcalias = funcname if (argalias == "") { argalias = funcname "_args" - if ($3 == "COMPAT") + if (flag("COMPAT")) argalias = "o" argalias - if ($3 == "COMPAT4") + if (flag("COMPAT4")) argalias = "freebsd4_" argalias - if ($3 == "COMPAT6") + if (flag("COMPAT6")) argalias = "freebsd6_" argalias } f++ @@ -325,8 +338,8 @@ flags = "0"; } - $3 == "STD" || $3 == "NODEF" || $3 == "NOARGS" || $3 == "NOPROTO" \ - || $3 == "NOIMPL" || $3 == "NOSTD" { + type("STD") || type("NODEF") || type("NOARGS") || type("NOPROTO") \ + || type("NOSTD") { parseline() printf("\t/* %s */\n\tcase %d: {\n", funcname, syscall) > systrace printf("\t/* %s */\n\tcase %d:\n", funcname, syscall) > systracetmp @@ -352,8 +365,8 @@ } printf("\t\t*n_args = %d;\n\t\tbreak;\n\t}\n", argc) > systrace printf("\t\tbreak;\n") > systracetmp - if (argc != 0 && $3 != "NOARGS" && $3 != "NOPROTO" && \ - $3 != "NODEF") { + if (argc != 0 && !flag("NOARGS") && !flag("NOPROTO") && \ + !flag("NODEF")) { printf("struct %s {\n", argalias) > sysarg for (i = 1; i <= argc; i++) printf("\tchar %s_l_[PADL_(%s)]; " \ @@ -363,10 +376,10 @@ argname[i], argtype[i]) > sysarg printf("};\n") > sysarg } - else if ($3 != "NOARGS" && $3 != "NOPROTO" && $3 != "NODEF") + else if (!flag("NOARGS") && !flag("NOPROTO") && !flag("NODEF")) printf("struct %s {\n\tregister_t dummy;\n};\n", argalias) > sysarg - if ($3 != "NOPROTO" && $3 != "NODEF") { + if (!flag("NOPROTO") && !flag("NODEF")) { printf("%s\t%s(struct thread *, struct %s *)", rettype, funcname, argalias) > sysdcl printf(";\n") > sysdcl @@ -375,10 +388,7 @@ } printf("\t{ %s, (sy_call_t *)", argssize) > sysent column = 8 + 2 + length(argssize) + 15 - if ($3 == "NOIMPL") { - printf("%s },", "nosys, AUE_NULL, NULL, 0, 0, 0") > sysent - column = column + length("nosys") + length("AUE_NULL") + 3 - } else if ($3 == "NOSTD") { + if (flag("NOSTD")) { printf("%s },", "lkmressys, AUE_NULL, NULL, 0, 0, 0") > sysent column = column + length("lkmressys") + length("AUE_NULL") + 3 } else { @@ -389,7 +399,7 @@ printf("/* %d = %s */\n", syscall, funcalias) > sysent printf("\t\"%s\",\t\t\t/* %d = %s */\n", funcalias, syscall, funcalias) > sysnames - if ($3 != "NODEF") { + if (!flag("NODEF")) { printf("#define\t%s%s\t%d\n", syscallprefix, funcalias, syscall) > syshdr printf(" \\\n\t%s.o", funcalias) > sysmk @@ -397,28 +407,32 @@ syscall++ next } - $3 == "COMPAT" || $3 == "COMPAT4" || $3 == "COMPAT6" || $3 == "CPT_NOA" { - if ($3 == "COMPAT" || $3 == "CPT_NOA") { + type("COMPAT") || type("COMPAT4") || type("COMPAT6") { + if (flag("COMPAT")) { ncompat++ out = syscompat outdcl = syscompatdcl wrap = "compat" prefix = "o" - } else if ($3 == "COMPAT4") { + descr = "old" + } else if (flag("COMPAT4")) { ncompat4++ out = syscompat4 outdcl = syscompat4dcl wrap = "compat4" prefix = "freebsd4_" - } else if ($3 == "COMPAT6") { + descr = "freebsd4" + } else if (flag("COMPAT6")) { ncompat6++ out = syscompat6 outdcl = syscompat6dcl wrap = "compat6" prefix = "freebsd6_" + descr = "freebsd6" } parseline() - if (argc != 0 && $3 != "CPT_NOA") { + if (argc != 0 && !flag("NOARGS") && !flag("NOPROTO") && \ + !flag("NODEF")) { printf("struct %s {\n", argalias) > out for (i = 1; i <= argc; i++) printf("\tchar %s_l_[PADL_(%s)]; %s %s; " \ @@ -428,22 +442,32 @@ argname[i], argtype[i]) > out printf("};\n") > out } - else if($3 != "CPT_NOA") + else if (!flag("NOARGS") && !flag("NOPROTO") && !flag("NODEF")) printf("struct %s {\n\tregister_t dummy;\n};\n", argalias) > sysarg - printf("%s\t%s%s(struct thread *, struct %s *);\n", - rettype, prefix, funcname, argalias) > outdcl - printf("\t{ %s(%s,%s), %s, NULL, 0, 0, %s },", - wrap, argssize, funcname, auditev, flags) > sysent - align_sysent_comment(8 + 9 + \ - length(argssize) + 1 + length(funcname) + length(auditev) + length(flags) + 4) - printf("/* %d = old %s */\n", syscall, funcalias) > sysent - printf("\t\"%s.%s\",\t\t/* %d = old %s */\n", - wrap, funcalias, syscall, funcalias) > sysnames - if ($3 == "COMPAT" || $3 == "CPT_NOA") { + if (!flag("NOPROTO") && !flag("NODEF")) { >>> TRUNCATED FOR MAIL (1000 lines) <<<