CVS commit: src/sys/dev/ic
Module Name:src Committed By: htodd Date: Mon Dec 16 01:51:19 UTC 2013 Modified Files: src/sys/dev/ic: com.c Log Message: Fix build. To generate a diff of this commit: cvs rdiff -u -r1.319 -r1.320 src/sys/dev/ic/com.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/com.c diff -u src/sys/dev/ic/com.c:1.319 src/sys/dev/ic/com.c:1.320 --- src/sys/dev/ic/com.c:1.319 Sun Dec 15 15:55:39 2013 +++ src/sys/dev/ic/com.c Mon Dec 16 01:51:19 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: com.c,v 1.319 2013/12/15 15:55:39 mbalmer Exp $ */ +/* $NetBSD: com.c,v 1.320 2013/12/16 01:51:19 htodd Exp $ */ /*- * Copyright (c) 1998, 1999, 2004, 2008 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.319 2013/12/15 15:55:39 mbalmer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.320 2013/12/16 01:51:19 htodd Exp $"); #include "opt_com.h" #include "opt_ddb.h" @@ -385,7 +385,7 @@ com_attach_subr(struct com_softc *sc) { struct com_regs *regsp = &sc->sc_regs; struct tty *tp; -#ifdef COM_16650 +#if (COM_16650 || COM_16750) u_int8_t lcr; #endif const char *fifo_msg = NULL;
CVS commit: src/share/man/man7
Module Name:src Committed By: wiz Date: Mon Dec 16 00:59:37 UTC 2013 Modified Files: src/share/man/man7: sysctl.7 Log Message: New sentence, new line. To generate a diff of this commit: cvs rdiff -u -r1.78 -r1.79 src/share/man/man7/sysctl.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man7/sysctl.7 diff -u src/share/man/man7/sysctl.7:1.78 src/share/man/man7/sysctl.7:1.79 --- src/share/man/man7/sysctl.7:1.78 Sun Dec 15 21:10:32 2013 +++ src/share/man/man7/sysctl.7 Mon Dec 16 00:59:37 2013 @@ -1,4 +1,4 @@ -.\" $NetBSD: sysctl.7,v 1.78 2013/12/15 21:10:32 pgoyette Exp $ +.\" $NetBSD: sysctl.7,v 1.79 2013/12/16 00:59:37 wiz Exp $ .\" .\" Copyright (c) 1993 .\" The Regents of the University of California. All rights reserved. @@ -752,8 +752,8 @@ See for additional details. .It Li kern.module.autotime An integer that controls the delay before an attempt is made to -automatically unload a module that was auto-loaded. Setting this value -to zero disables the auto-unload function. +automatically unload a module that was auto-loaded. +Setting this value to zero disables the auto-unload function. .It Li kern.module.verbose A boolean that enables or disables verbose debug messages related to kernel modules.
CVS commit: src/dist/smbfs/lib/smb
Module Name:src Committed By: stacktic Date: Sun Dec 15 21:48:56 UTC 2013 Modified Files: src/dist/smbfs/lib/smb: nb_name.c Log Message: nb_name_len does not increase size when nn_scope contains only a \0, do the same on nb_name_encode to avoid a buffer overflow To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/dist/smbfs/lib/smb/nb_name.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/dist/smbfs/lib/smb/nb_name.c diff -u src/dist/smbfs/lib/smb/nb_name.c:1.6 src/dist/smbfs/lib/smb/nb_name.c:1.7 --- src/dist/smbfs/lib/smb/nb_name.c:1.6 Sun Dec 15 21:45:07 2013 +++ src/dist/smbfs/lib/smb/nb_name.c Sun Dec 15 21:48:55 2013 @@ -33,7 +33,7 @@ */ #include -__RCSID("$NetBSD: nb_name.c,v 1.6 2013/12/15 21:45:07 stacktic Exp $"); +__RCSID("$NetBSD: nb_name.c,v 1.7 2013/12/15 21:48:55 stacktic Exp $"); #include #include @@ -183,7 +183,7 @@ nb_name_encode(struct nb_name *np, u_cha cp += 2; } *cp = 0; - if (np->nn_scope == NULL) + if (np->nn_scope == NULL || *np->nn_scope == 0) return nb_encname_len(dst); plen = cp++; lblen = 0;
CVS commit: src/dist/smbfs/lib/smb
Module Name:src Committed By: stacktic Date: Sun Dec 15 21:45:07 UTC 2013 Modified Files: src/dist/smbfs/lib/smb: nb_name.c Log Message: Make sure we keep enough space to encode the type To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/dist/smbfs/lib/smb/nb_name.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/dist/smbfs/lib/smb/nb_name.c diff -u src/dist/smbfs/lib/smb/nb_name.c:1.5 src/dist/smbfs/lib/smb/nb_name.c:1.6 --- src/dist/smbfs/lib/smb/nb_name.c:1.5 Fri Apr 4 08:05:34 2003 +++ src/dist/smbfs/lib/smb/nb_name.c Sun Dec 15 21:45:07 2013 @@ -33,7 +33,7 @@ */ #include -__RCSID("$NetBSD: nb_name.c,v 1.5 2003/04/04 08:05:34 jdolecek Exp $"); +__RCSID("$NetBSD: nb_name.c,v 1.6 2013/12/15 21:45:07 stacktic Exp $"); #include #include @@ -169,7 +169,7 @@ nb_name_encode(struct nb_name *np, u_cha memsetw(cp + 2, NB_NAMELEN - 1, NBENCODE(' ')); cp += NB_ENCNAMELEN; } else { - for (i = 0; *name && i < NB_NAMELEN; i++, cp += 2, name++) { + for (i = 0; *name && i < NB_NAMELEN - 1; i++, cp += 2, name++) { ch = NBENCODE(toupper(*name)); memcpy(cp, &ch, 2); }
CVS commit: src/sys/net
Module Name:src Committed By: pooka Date: Sun Dec 15 21:18:01 UTC 2013 Modified Files: src/sys/net: bpfjit.c Log Message: XXXgcc Wuninitialized kludge To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/net/bpfjit.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/bpfjit.c diff -u src/sys/net/bpfjit.c:1.5 src/sys/net/bpfjit.c:1.6 --- src/sys/net/bpfjit.c:1.5 Fri Nov 15 13:56:21 2013 +++ src/sys/net/bpfjit.c Sun Dec 15 21:18:01 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: bpfjit.c,v 1.5 2013/11/15 13:56:21 rmind Exp $ */ +/* $NetBSD: bpfjit.c,v 1.6 2013/12/15 21:18:01 pooka Exp $ */ /*- * Copyright (c) 2011-2012 Alexander Nasonov. @@ -31,9 +31,9 @@ #include #ifdef _KERNEL -__KERNEL_RCSID(0, "$NetBSD: bpfjit.c,v 1.5 2013/11/15 13:56:21 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bpfjit.c,v 1.6 2013/12/15 21:18:01 pooka Exp $"); #else -__RCSID("$NetBSD: bpfjit.c,v 1.5 2013/11/15 13:56:21 rmind Exp $"); +__RCSID("$NetBSD: bpfjit.c,v 1.6 2013/12/15 21:18:01 pooka Exp $"); #endif #include @@ -485,7 +485,7 @@ emit_pkt_read(struct sljit_compiler* com struct bpf_insn *pc, struct sljit_jump *to_mchain_jump, struct sljit_jump **ret0, size_t *ret0_size) { - int status; + int status = 0; /* XXX gcc 4.1 */ uint32_t width; struct sljit_jump *jump; #ifdef _KERNEL
CVS commit: src/sys/lib/libkern
Module Name:src Committed By: pooka Date: Sun Dec 15 21:15:41 UTC 2013 Modified Files: src/sys/lib/libkern: libkern.h Log Message: Allow overriding CTASSERT. This helps with building NetBSD sources with compilers that don't support __COUNTER__ -- shifting the CTASSERTs around to avoid __LINE__ conflicts is a hopeless struggle. To generate a diff of this commit: cvs rdiff -u -r1.110 -r1.111 src/sys/lib/libkern/libkern.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/lib/libkern/libkern.h diff -u src/sys/lib/libkern/libkern.h:1.110 src/sys/lib/libkern/libkern.h:1.111 --- src/sys/lib/libkern/libkern.h:1.110 Wed Dec 11 01:24:08 2013 +++ src/sys/lib/libkern/libkern.h Sun Dec 15 21:15:41 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: libkern.h,v 1.110 2013/12/11 01:24:08 joerg Exp $ */ +/* $NetBSD: libkern.h,v 1.111 2013/12/15 21:15:41 pooka Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -189,9 +189,15 @@ tolower(int ch) #endif #endif +#ifndef CTASSERT #define CTASSERT(x) __CTASSERT(x) +#endif +#ifndef CTASSERT_SIGNED #define CTASSERT_SIGNED(x) __CTASSERT(((typeof(x))-1) < 0) +#endif +#ifndef CTASSERT_UNSIGNED #define CTASSERT_UNSIGNED(x) __CTASSERT(((typeof(x))-1) >= 0) +#endif #ifndef DIAGNOSTIC #define _DIAGASSERT(a) (void)0
CVS commit: src/share/man/man7
Module Name:src Committed By: pgoyette Date: Sun Dec 15 21:10:32 UTC 2013 Modified Files: src/share/man/man7: sysctl.7 Log Message: Mention the new kern.module.autotime variable. To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/share/man/man7/sysctl.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man7/sysctl.7 diff -u src/share/man/man7/sysctl.7:1.77 src/share/man/man7/sysctl.7:1.78 --- src/share/man/man7/sysctl.7:1.77 Sun Oct 27 10:09:28 2013 +++ src/share/man/man7/sysctl.7 Sun Dec 15 21:10:32 2013 @@ -1,4 +1,4 @@ -.\" $NetBSD: sysctl.7,v 1.77 2013/10/27 10:09:28 apb Exp $ +.\" $NetBSD: sysctl.7,v 1.78 2013/12/15 21:10:32 pgoyette Exp $ .\" .\" Copyright (c) 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)sysctl.3 8.4 (Berkeley) 5/9/95 .\" -.Dd October 27, 2013 +.Dd December 14, 2013 .Dt SYSCTL 7 .Os .Sh NAME @@ -739,6 +739,7 @@ The third level names for the settings a .Bl -column "kern.module.autoload" "integer" "Changeable" -offset indent .It Sy Third level name Type Changeable .It kern.module.autoload integer yes +.It kern.module.autotime integer yes .It kern.module.verbose integer yes .El .Pp @@ -749,6 +750,10 @@ A boolean that controls whether kernel m See .Xr module 7 for additional details. +.It Li kern.module.autotime +An integer that controls the delay before an attempt is made to +automatically unload a module that was auto-loaded. Setting this value +to zero disables the auto-unload function. .It Li kern.module.verbose A boolean that enables or disables verbose debug messages related to kernel modules.
CVS commit: src/sys/kern
Module Name:src Committed By: pgoyette Date: Sun Dec 15 21:09:50 UTC 2013 Modified Files: src/sys/kern: kern_module.c Log Message: Make the auto-unload timeout configurable via sysctl, and if the timeout is set to zero, disable all auto-unloads (even those that were "scheduled" previously). To generate a diff of this commit: cvs rdiff -u -r1.93 -r1.94 src/sys/kern/kern_module.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_module.c diff -u src/sys/kern/kern_module.c:1.93 src/sys/kern/kern_module.c:1.94 --- src/sys/kern/kern_module.c:1.93 Fri Sep 13 07:18:34 2013 +++ src/sys/kern/kern_module.c Sun Dec 15 21:09:50 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_module.c,v 1.93 2013/09/13 07:18:34 jnemeth Exp $ */ +/* $NetBSD: kern_module.c,v 1.94 2013/12/15 21:09:50 pgoyette Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.93 2013/09/13 07:18:34 jnemeth Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.94 2013/12/15 21:09:50 pgoyette Exp $"); #define _MODULE_INTERNAL @@ -99,6 +99,8 @@ static void module_enqueue(module_t *); static bool module_merge_dicts(prop_dictionary_t, const prop_dictionary_t); static void sysctl_module_setup(void); +static int sysctl_module_autotime(SYSCTLFN_PROTO); + #define MODULE_CLASS_MATCH(mi, class) \ ((class) == MODULE_CLASS_ANY || (class) == (mi)->mi_class) @@ -405,6 +407,27 @@ module_builtin_require_force(void) static struct sysctllog *module_sysctllog; +static int +sysctl_module_autotime(SYSCTLFN_ARGS) +{ + struct sysctlnode node; + int t, error; + + t = *(int *)rnode->sysctl_data; + + node = *rnode; + node.sysctl_data = &t; + error = sysctl_lookup(SYSCTLFN_CALL(&node)); + if (error || newp == NULL) + return (error); + + if (t < 0) + return (EINVAL); + + *(int *)rnode->sysctl_data = t; + return (0); +} + static void sysctl_module_setup(void) { @@ -437,6 +460,12 @@ sysctl_module_setup(void) SYSCTL_DESCR("Enable verbose output"), NULL, 0, &module_verbose_on, 0, CTL_CREATE, CTL_EOL); + sysctl_createv(&module_sysctllog, 0, &node, NULL, + CTLFLAG_PERMANENT | CTLFLAG_READWRITE, + CTLTYPE_INT, "autotime", + SYSCTL_DESCR("Auto-unload delay"), + sysctl_module_autotime, 0, &module_autotime, 0, + CTL_CREATE, CTL_EOL); } /* @@ -1107,10 +1136,10 @@ module_do_load(const char *name, bool is if (modp != NULL) { *modp = mod; } - if (autoload) { + if (autoload && module_autotime > 0) { /* * Arrange to try unloading the module after - * a short delay. + * a short delay unless auto-unload is disabled. */ mod->mod_autotime = time_second + module_autotime; mod->mod_flags |= MODFLG_AUTO_LOADED; @@ -1288,7 +1317,9 @@ module_find_section(const char *name, vo * * Automatically unload modules. We try once to unload autoloaded * modules after module_autotime seconds. If the system is under - * severe memory pressure, we'll try unloading all modules. + * severe memory pressure, we'll try unloading all modules, else if + * module_autotime is zero, we don't try to unload, even if the + * module was previously scheduled for unload. */ static void module_thread(void *cookie) @@ -1311,7 +1342,8 @@ module_thread(void *cookie) if (uvmexp.free < uvmexp.freemin) { module_thread_ticks = hz; - } else if (mod->mod_autotime == 0) { + } else if (module_autotime == 0 || + mod->mod_autotime == 0) { continue; } else if (time_second < mod->mod_autotime) { module_thread_ticks = hz;
CVS commit: src/usr.bin/fstat
Module Name:src Committed By: mlelstv Date: Sun Dec 15 18:56:59 UTC 2013 Modified Files: src/usr.bin/fstat: fstat.c Log Message: Fix output for -A -f ... To generate a diff of this commit: cvs rdiff -u -r1.105 -r1.106 src/usr.bin/fstat/fstat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/fstat/fstat.c diff -u src/usr.bin/fstat/fstat.c:1.105 src/usr.bin/fstat/fstat.c:1.106 --- src/usr.bin/fstat/fstat.c:1.105 Sun Dec 15 09:21:03 2013 +++ src/usr.bin/fstat/fstat.c Sun Dec 15 18:56:59 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: fstat.c,v 1.105 2013/12/15 09:21:03 wiz Exp $ */ +/* $NetBSD: fstat.c,v 1.106 2013/12/15 18:56:59 mlelstv Exp $ */ /*- * Copyright (c) 1988, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19 #if 0 static char sccsid[] = "@(#)fstat.c 8.3 (Berkeley) 5/2/95"; #else -__RCSID("$NetBSD: fstat.c,v 1.105 2013/12/15 09:21:03 wiz Exp $"); +__RCSID("$NetBSD: fstat.c,v 1.106 2013/12/15 18:56:59 mlelstv Exp $"); #endif #endif /* not lint */ @@ -502,7 +502,7 @@ ftrans(fdfile_t *fp, int i) i, fdfile.ff_file, Pid); return; } - if (Aflg && file.f_type != DTYPE_VNODE) + if (Aflg && file.f_type != DTYPE_VNODE && checkfile == 0) (void)printf("%*lx ", 2*(int)(sizeof(void*)), (long)fdfile.ff_file); switch (file.f_type) {
CVS commit: src/sys/dev/usb
Module Name:src Committed By: jakllsch Date: Sun Dec 15 18:50:25 UTC 2013 Modified Files: src/sys/dev/usb: ohci.c Log Message: Correct a KASSERT's logic (SET vs. GET). To generate a diff of this commit: cvs rdiff -u -r1.246 -r1.247 src/sys/dev/usb/ohci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/ohci.c diff -u src/sys/dev/usb/ohci.c:1.246 src/sys/dev/usb/ohci.c:1.247 --- src/sys/dev/usb/ohci.c:1.246 Sun Dec 15 10:25:23 2013 +++ src/sys/dev/usb/ohci.c Sun Dec 15 18:50:25 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ohci.c,v 1.246 2013/12/15 10:25:23 skrll Exp $ */ +/* $NetBSD: ohci.c,v 1.247 2013/12/15 18:50:25 jakllsch Exp $ */ /* * Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.246 2013/12/15 10:25:23 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.247 2013/12/15 18:50:25 jakllsch Exp $"); #include #include @@ -1722,7 +1722,7 @@ ohci_device_request(usbd_xfer_handle xfe BUS_DMASYNC_POSTWRITE | BUS_DMASYNC_POSTREAD); KASSERT(OHCI_ED_GET_FA(HTOO32(sed->ed.ed_flags)) == dev->address); -KASSERT(OHCI_ED_SET_MAXP(HTOO32(sed->ed.ed_flags)) == +KASSERT(OHCI_ED_GET_MAXP(HTOO32(sed->ed.ed_flags)) == UGETW(opipe->pipe.endpoint->edesc->wMaxPacketSize)); next = stat;
CVS commit: src
Module Name:src Committed By: joerg Date: Sun Dec 15 18:08:37 UTC 2013 Modified Files: src/compat/arm/oabi: bsd.oabi.mk src/share/mk: bsd.own.mk src/sys/arch/acorn26/stand: Makefile.buildboot src/sys/arch/acorn32/stand: Makefile.buildboot src/sys/arch/evbarm/stand/boot2440: Makefile src/sys/arch/evbarm/stand/bootimx23: Makefile src/sys/arch/evbarm/stand/gzboot: Makefile.gzboot src/sys/arch/zaurus/stand/zboot: Makefile src/sys/arch/zaurus/stand/zbsdmod: Makefile Log Message: Move flags for ARM's APCS ABI into a common variable. Add some forces to deal with limitations in the Clang <-> LLVM backend interaction to pick the correct ABI and target assembler. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/compat/arm/oabi/bsd.oabi.mk cvs rdiff -u -r1.757 -r1.758 src/share/mk/bsd.own.mk cvs rdiff -u -r1.19 -r1.20 src/sys/arch/acorn26/stand/Makefile.buildboot cvs rdiff -u -r1.19 -r1.20 src/sys/arch/acorn32/stand/Makefile.buildboot cvs rdiff -u -r1.14 -r1.15 src/sys/arch/evbarm/stand/boot2440/Makefile cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbarm/stand/bootimx23/Makefile cvs rdiff -u -r1.28 -r1.29 src/sys/arch/evbarm/stand/gzboot/Makefile.gzboot cvs rdiff -u -r1.14 -r1.15 src/sys/arch/zaurus/stand/zboot/Makefile cvs rdiff -u -r1.7 -r1.8 src/sys/arch/zaurus/stand/zbsdmod/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/compat/arm/oabi/bsd.oabi.mk diff -u src/compat/arm/oabi/bsd.oabi.mk:1.1 src/compat/arm/oabi/bsd.oabi.mk:1.2 --- src/compat/arm/oabi/bsd.oabi.mk:1.1 Sat Apr 27 08:44:35 2013 +++ src/compat/arm/oabi/bsd.oabi.mk Sun Dec 15 18:08:37 2013 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.oabi.mk,v 1.1 2013/04/27 08:44:35 matt Exp $ +# $NetBSD: bsd.oabi.mk,v 1.2 2013/12/15 18:08:37 joerg Exp $ MLIBDIR= oabi .if ${MACHINE_ARCH:M*eb} != "" @@ -20,10 +20,10 @@ CRYPTO_MACHINE_CPU= ${ARM_MACHINE_ARCH} LDELFSO_MACHINE_CPU= ${ARM_MACHINE_ARCH} GOMP_MACHINE_ARCH= ${ARM_MACHINE_ARCH} -COPTS+= -mabi=apcs-gnu -mfloat-abi=soft -CPUFLAGS+= -mabi=apcs-gnu -mfloat-abi=soft -LDADD+= -mabi=apcs-gnu -mfloat-abi=soft -LDFLAGS+= -mabi=apcs-gnu -mfloat-abi=soft -MKDEPFLAGS+= -mabi=apcs-gnu -mfloat-abi=soft +COPTS+= ${ARM_APCS_FLAGS} +CPUFLAGS+= ${ARM_APCS_FLAGS} +LDADD+= ${ARM_APCS_FLAGS} +LDFLAGS+= ${ARM_APCS_FLAGS} +MKDEPFLAGS+= ${ARM_APCS_FLAGS} .include "${.PARSEDIR}/../../Makefile.compat" Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.757 src/share/mk/bsd.own.mk:1.758 --- src/share/mk/bsd.own.mk:1.757 Fri Dec 6 23:14:15 2013 +++ src/share/mk/bsd.own.mk Sun Dec 15 18:08:37 2013 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.757 2013/12/06 23:14:15 matt Exp $ +# $NetBSD: bsd.own.mk,v 1.758 2013/12/15 18:08:37 joerg Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -756,6 +756,12 @@ MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsd .endif +.if !empty(MACHINE_ARCH:Marm*) +# Flags to pass to CC for using the old APCS ABI on ARM for compat or stand. +ARM_APCS_FLAGS= -mabi=apcs-gnu -mfloat-abi=soft +ARM_APCS_FLAGS+=${${ACTIVE_CC} == "clang":? -target ${MACHINE_GNU_ARCH}--netbsdelf -B ${TOOLDIR}/${MACHINE_GNU_PLATFORM}/bin :} +.endif + # # Determine if arch uses native kernel modules with rump # Index: src/sys/arch/acorn26/stand/Makefile.buildboot diff -u src/sys/arch/acorn26/stand/Makefile.buildboot:1.19 src/sys/arch/acorn26/stand/Makefile.buildboot:1.20 --- src/sys/arch/acorn26/stand/Makefile.buildboot:1.19 Mon Nov 4 21:25:22 2013 +++ src/sys/arch/acorn26/stand/Makefile.buildboot Sun Dec 15 18:08:37 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.buildboot,v 1.19 2013/11/04 21:25:22 christos Exp $ +# $NetBSD: Makefile.buildboot,v 1.20 2013/12/15 18:08:37 joerg Exp $ S?= ${.CURDIR}/../../../.. @@ -33,7 +33,7 @@ CPUFLAGS= CPPFLAGS+= -D_STANDALONE -DHIMEM=0x28000 CPPFLAGS+= -I. -I${.CURDIR}/../../.. -I${.CURDIR}/../../../.. CPPFLAGS+= -I${.CURDIR}/../lib -CPPFLAGS+= -mabi=apcs-gnu -mfloat-abi=soft -march=armv2 +CPPFLAGS+= ${ARM_APCS_FLAGS} -march=armv2 .if ${HAVE_GCC} < 48 CPPFLAGS+= -mno-thumb -mno-thumb-interwork .else Index: src/sys/arch/acorn32/stand/Makefile.buildboot diff -u src/sys/arch/acorn32/stand/Makefile.buildboot:1.19 src/sys/arch/acorn32/stand/Makefile.buildboot:1.20 --- src/sys/arch/acorn32/stand/Makefile.buildboot:1.19 Mon Nov 4 21:25:22 2013 +++ src/sys/arch/acorn32/stand/Makefile.buildboot Sun Dec 15 18:08:37 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.buildboot,v 1.19 2013/11/04 21:25:22 christos Exp $ +# $NetBSD: Makefile.buildboot,v 1.20 2013/12/15 18:08:37 joerg Exp $ S?= ${.CURDIR}/../../../.. @@ -43,7 +43,7 @@ vers.c: ${.CURDIR}/version CPPFLAGS+= -D_STANDALONE CPPFLAGS+= -I. -I${.CURDIR}/../../.. -I${.CURDIR}/../../../.. CPPFLAGS+= -I${.CURDIR}/../lib -CPPFLAGS+= -mabi=apcs-gnu -mfloat-abi=so
CVS commit: src/sys/dev/usb
Module Name:src Committed By: para Date: Sun Dec 15 17:15:34 UTC 2013 Modified Files: src/sys/dev/usb: ehci.c Log Message: mark variable usage, fix non DIAGNOSTIC non DEBUG build To generate a diff of this commit: cvs rdiff -u -r1.222 -r1.223 src/sys/dev/usb/ehci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/ehci.c diff -u src/sys/dev/usb/ehci.c:1.222 src/sys/dev/usb/ehci.c:1.223 --- src/sys/dev/usb/ehci.c:1.222 Sun Dec 15 10:25:23 2013 +++ src/sys/dev/usb/ehci.c Sun Dec 15 17:15:34 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ehci.c,v 1.222 2013/12/15 10:25:23 skrll Exp $ */ +/* $NetBSD: ehci.c,v 1.223 2013/12/15 17:15:34 para Exp $ */ /* * Copyright (c) 2004-2012 The NetBSD Foundation, Inc. @@ -53,7 +53,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.222 2013/12/15 10:25:23 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.223 2013/12/15 17:15:34 para Exp $"); #include "ohci.h" #include "uhci.h" @@ -3364,7 +3364,7 @@ ehci_device_request(usbd_xfer_handle xfe usb_device_request_t *req = &xfer->request; usbd_device_handle dev = epipe->pipe.device; ehci_softc_t *sc = dev->bus->hci_private; - int addr = dev->address; + int addr __diagused = dev->address; ehci_soft_qtd_t *setup, *stat, *next; ehci_soft_qh_t *sqh; int isread;
CVS commit: src/sys/dev/ic
Module Name:src Committed By: mbalmer Date: Sun Dec 15 15:55:39 UTC 2013 Modified Files: src/sys/dev/ic: com.c Log Message: lcr is only used when COM_16650 is defined; unbreak the build To generate a diff of this commit: cvs rdiff -u -r1.318 -r1.319 src/sys/dev/ic/com.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/com.c diff -u src/sys/dev/ic/com.c:1.318 src/sys/dev/ic/com.c:1.319 --- src/sys/dev/ic/com.c:1.318 Sun Dec 15 11:06:57 2013 +++ src/sys/dev/ic/com.c Sun Dec 15 15:55:39 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: com.c,v 1.318 2013/12/15 11:06:57 skrll Exp $ */ +/* $NetBSD: com.c,v 1.319 2013/12/15 15:55:39 mbalmer Exp $ */ /*- * Copyright (c) 1998, 1999, 2004, 2008 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.318 2013/12/15 11:06:57 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.319 2013/12/15 15:55:39 mbalmer Exp $"); #include "opt_com.h" #include "opt_ddb.h" @@ -385,7 +385,9 @@ com_attach_subr(struct com_softc *sc) { struct com_regs *regsp = &sc->sc_regs; struct tty *tp; +#ifdef COM_16650 u_int8_t lcr; +#endif const char *fifo_msg = NULL; prop_dictionary_t dict; bool is_console = true;
CVS commit: src/sys/dev/ic
Module Name:src Committed By: skrll Date: Sun Dec 15 11:06:57 UTC 2013 Modified Files: src/sys/dev/ic: com.c Log Message: Only attempt to set 64byte fifo for 16750 when COM_16750 is defined. Hi kiyohara. PR/48359 NetBSD/cobalt 6.99.25 GENERIC kernel freeze at initializing com0 To generate a diff of this commit: cvs rdiff -u -r1.317 -r1.318 src/sys/dev/ic/com.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/com.c diff -u src/sys/dev/ic/com.c:1.317 src/sys/dev/ic/com.c:1.318 --- src/sys/dev/ic/com.c:1.317 Thu Oct 3 13:23:03 2013 +++ src/sys/dev/ic/com.c Sun Dec 15 11:06:57 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: com.c,v 1.317 2013/10/03 13:23:03 kiyohara Exp $ */ +/* $NetBSD: com.c,v 1.318 2013/12/15 11:06:57 skrll Exp $ */ /*- * Copyright (c) 1998, 1999, 2004, 2008 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.317 2013/10/03 13:23:03 kiyohara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.318 2013/12/15 11:06:57 skrll Exp $"); #include "opt_com.h" #include "opt_ddb.h" @@ -492,6 +492,7 @@ com_attach_subr(struct com_softc *sc) #endif sc->sc_fifolen = 16; +#ifdef COM_16750 /* * TL16C750 can enable 64byte FIFO, only when DLAB * is 1. However, some 16750 may always enable. For @@ -522,6 +523,7 @@ com_attach_subr(struct com_softc *sc) SET(sc->sc_hwflags, COM_HW_AFE); } else CSR_WRITE_1(regsp, COM_REG_FIFO, fcr); +#endif #ifdef COM_16650 CSR_WRITE_1(regsp, COM_REG_LCR, lcr); @@ -531,9 +533,11 @@ com_attach_subr(struct com_softc *sc) fifo_msg = "st16650a, working fifo"; else #endif +#ifdef COM_16750 if (sc->sc_fifolen == 64) fifo_msg = "tl16c750, working fifo"; else +#endif fifo_msg = "ns16550a, working fifo"; } else fifo_msg = "ns16550, broken fifo";
CVS commit: src/crypto/external/bsd/openssh/dist
Module Name:src Committed By: spz Date: Sun Dec 15 10:42:52 UTC 2013 Modified Files: src/crypto/external/bsd/openssh/dist: servconf.c Log Message: Coverity issues 996120 and 996121, Use after free Use the M_CP_STROPT definition exclusive to servconf.c twice and you have freed your original string. servconf.h won copying authorized_keys_command and authorized_keys_command_user in COPY_MATCH_STRING_OPTS in 1.107, but servconf.c didn't drop its own, so it walks into this trap. Remove the duplicate copies, and disarm the trap. Note this is on a code path where authorized_keys_command and authorized_keys_command_user don't actually get used except for a debug dump of the config, and dump_cfg_string protects itself against trying to print NULL pointers, so all you get is sshd -T -C ... giving wrong results, which is rather insignificant as far as security issues go. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/crypto/external/bsd/openssh/dist/servconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/openssh/dist/servconf.c diff -u src/crypto/external/bsd/openssh/dist/servconf.c:1.13 src/crypto/external/bsd/openssh/dist/servconf.c:1.14 --- src/crypto/external/bsd/openssh/dist/servconf.c:1.13 Fri Nov 8 19:18:25 2013 +++ src/crypto/external/bsd/openssh/dist/servconf.c Sun Dec 15 10:42:52 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: servconf.c,v 1.13 2013/11/08 19:18:25 christos Exp $ */ +/* $NetBSD: servconf.c,v 1.14 2013/12/15 10:42:52 spz Exp $ */ /* $OpenBSD: servconf.c,v 1.240 2013/07/19 07:37:48 markus Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -12,7 +12,7 @@ */ #include "includes.h" -__RCSID("$NetBSD: servconf.c,v 1.13 2013/11/08 19:18:25 christos Exp $"); +__RCSID("$NetBSD: servconf.c,v 1.14 2013/12/15 10:42:52 spz Exp $"); #include #include #include @@ -2012,7 +2012,7 @@ int server_match_spec_complete(struct co dst->n = src->n; \ } while (0) #define M_CP_STROPT(n) do {\ - if (src->n != NULL) { \ + if (src->n != NULL && dst->n != src->n) { \ free(dst->n); \ dst->n = src->n; \ } \ @@ -2043,8 +2043,6 @@ copy_set_server_options(ServerOptions *d M_CP_INTOPT(hostbased_uses_name_from_packet_only); M_CP_INTOPT(kbd_interactive_authentication); M_CP_INTOPT(zero_knowledge_password_authentication); - M_CP_STROPT(authorized_keys_command); - M_CP_STROPT(authorized_keys_command_user); M_CP_INTOPT(permit_root_login); M_CP_INTOPT(permit_empty_passwd);
CVS commit: src/sys/dev/usb
Module Name:src Committed By: skrll Date: Sun Dec 15 10:25:23 UTC 2013 Modified Files: src/sys/dev/usb: ehci.c ohci.c Log Message: Now that usbd_new_device has been fixed there is no need to touch QHs/EDs in [eo]hci_device_request. KASSERT the address and maximum packet length just in case. To generate a diff of this commit: cvs rdiff -u -r1.221 -r1.222 src/sys/dev/usb/ehci.c cvs rdiff -u -r1.245 -r1.246 src/sys/dev/usb/ohci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/ehci.c diff -u src/sys/dev/usb/ehci.c:1.221 src/sys/dev/usb/ehci.c:1.222 --- src/sys/dev/usb/ehci.c:1.221 Sun Dec 1 07:34:16 2013 +++ src/sys/dev/usb/ehci.c Sun Dec 15 10:25:23 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ehci.c,v 1.221 2013/12/01 07:34:16 skrll Exp $ */ +/* $NetBSD: ehci.c,v 1.222 2013/12/15 10:25:23 skrll Exp $ */ /* * Copyright (c) 2004-2012 The NetBSD Foundation, Inc. @@ -53,7 +53,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.221 2013/12/01 07:34:16 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.222 2013/12/15 10:25:23 skrll Exp $"); #include "ohci.h" #include "uhci.h" @@ -3395,18 +3395,9 @@ ehci_device_request(usbd_xfer_handle xfe sqh = epipe->sqh; - /* - * Update device address and length since they may have changed - * during the setup of the control pipe in usbd_new_device(). - */ - /* XXX This only needs to be done once, but it's too early in open. */ - /* Should not touch ED here! */ - sqh->qh.qh_endp = - (sqh->qh.qh_endp & htole32(~(EHCI_QH_ADDRMASK | EHCI_QH_MPLMASK))) | - htole32( - EHCI_QH_SET_ADDR(addr) | - EHCI_QH_SET_MPL(UGETW(epipe->pipe.endpoint->edesc->wMaxPacketSize)) - ); + KASSERT(EHCI_QH_GET_ADDR(le32toh(sqh->qh.qh_endp)) == addr); + KASSERT(EHCI_QH_GET_MPL(le32toh(sqh->qh.qh_endp)) == + UGETW(epipe->pipe.endpoint->edesc->wMaxPacketSize)); /* Set up data transaction */ if (len != 0) { Index: src/sys/dev/usb/ohci.c diff -u src/sys/dev/usb/ohci.c:1.245 src/sys/dev/usb/ohci.c:1.246 --- src/sys/dev/usb/ohci.c:1.245 Sun Dec 1 07:28:47 2013 +++ src/sys/dev/usb/ohci.c Sun Dec 15 10:25:23 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ohci.c,v 1.245 2013/12/01 07:28:47 skrll Exp $ */ +/* $NetBSD: ohci.c,v 1.246 2013/12/15 10:25:23 skrll Exp $ */ /* * Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.245 2013/12/01 07:28:47 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.246 2013/12/15 10:25:23 skrll Exp $"); #include #include @@ -1683,7 +1683,6 @@ ohci_device_request(usbd_xfer_handle xfe usb_device_request_t *req = &xfer->request; usbd_device_handle dev = opipe->pipe.device; ohci_softc_t *sc = dev->bus->hci_private; - int addr = dev->address; ohci_soft_td_t *setup, *stat, *next, *tail; ohci_soft_ed_t *sed; int isread; @@ -1698,7 +1697,7 @@ ohci_device_request(usbd_xfer_handle xfe DPRINTFN(3,("ohci_device_control type=0x%02x, request=0x%02x, " "wValue=0x%04x, wIndex=0x%04x len=%d, addr=%d, endpt=%d\n", req->bmRequestType, req->bRequest, UGETW(req->wValue), - UGETW(req->wIndex), len, addr, + UGETW(req->wIndex), len, dev->address, opipe->pipe.endpoint->edesc->bEndpointAddress)); setup = opipe->tail.td; @@ -1717,21 +1716,14 @@ ohci_device_request(usbd_xfer_handle xfe sed = opipe->sed; opipe->u.ctl.length = len; - /* Update device address and length since they may have changed - during the setup of the control pipe in usbd_new_device(). */ - /* XXX This only needs to be done once, but it's too early in open. */ - /* Should not touch ED here! */ - + /* XXX is this ever written to by hardware ??? */ usb_syncmem(&sed->dma, sed->offs + offsetof(ohci_ed_t, ed_flags), sizeof(sed->ed.ed_flags), BUS_DMASYNC_POSTWRITE | BUS_DMASYNC_POSTREAD); - sed->ed.ed_flags = HTOO32( - (O32TOH(sed->ed.ed_flags) & ~(OHCI_ED_ADDRMASK | OHCI_ED_MAXPMASK)) | - OHCI_ED_SET_FA(addr) | - OHCI_ED_SET_MAXP(UGETW(opipe->pipe.endpoint->edesc->wMaxPacketSize))); - usb_syncmem(&sed->dma, sed->offs + offsetof(ohci_ed_t, ed_flags), - sizeof(sed->ed.ed_flags), - BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD); + +KASSERT(OHCI_ED_GET_FA(HTOO32(sed->ed.ed_flags)) == dev->address); +KASSERT(OHCI_ED_SET_MAXP(HTOO32(sed->ed.ed_flags)) == +UGETW(opipe->pipe.endpoint->edesc->wMaxPacketSize)); next = stat;
CVS commit: src/usr.bin/fstat
Module Name:src Committed By: wiz Date: Sun Dec 15 09:21:03 UTC 2013 Modified Files: src/usr.bin/fstat: fstat.c Log Message: sync usage with man page To generate a diff of this commit: cvs rdiff -u -r1.104 -r1.105 src/usr.bin/fstat/fstat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/fstat/fstat.c diff -u src/usr.bin/fstat/fstat.c:1.104 src/usr.bin/fstat/fstat.c:1.105 --- src/usr.bin/fstat/fstat.c:1.104 Sun Dec 15 08:16:24 2013 +++ src/usr.bin/fstat/fstat.c Sun Dec 15 09:21:03 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: fstat.c,v 1.104 2013/12/15 08:16:24 mlelstv Exp $ */ +/* $NetBSD: fstat.c,v 1.105 2013/12/15 09:21:03 wiz Exp $ */ /*- * Copyright (c) 1988, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19 #if 0 static char sccsid[] = "@(#)fstat.c 8.3 (Berkeley) 5/2/95"; #else -__RCSID("$NetBSD: fstat.c,v 1.104 2013/12/15 08:16:24 mlelstv Exp $"); +__RCSID("$NetBSD: fstat.c,v 1.105 2013/12/15 09:21:03 wiz Exp $"); #endif #endif /* not lint */ @@ -1325,7 +1325,7 @@ getftype(enum vtype v_type) static void usage(void) { - (void)fprintf(stderr, "Usage: %s [-Afnv] [-p pid] [-u user] " - "[-N system] [-M core] [file ...]\n", getprogname()); + (void)fprintf(stderr, "Usage: %s [-Afnv] [-M core] [-N system] " + "[-p pid] [-u user] [file ...]\n", getprogname()); exit(1); }
CVS commit: src/usr.bin/fstat
Module Name:src Committed By: wiz Date: Sun Dec 15 09:20:48 UTC 2013 Modified Files: src/usr.bin/fstat: fstat.1 Log Message: Sort SYNOPSIS and option descriptions. Bump date for previous. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/usr.bin/fstat/fstat.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/fstat/fstat.1 diff -u src/usr.bin/fstat/fstat.1:1.32 src/usr.bin/fstat/fstat.1:1.33 --- src/usr.bin/fstat/fstat.1:1.32 Sun Dec 15 08:16:24 2013 +++ src/usr.bin/fstat/fstat.1 Sun Dec 15 09:20:48 2013 @@ -1,4 +1,4 @@ -.\" $NetBSD: fstat.1,v 1.32 2013/12/15 08:16:24 mlelstv Exp $ +.\" $NetBSD: fstat.1,v 1.33 2013/12/15 09:20:48 wiz Exp $ .\" .\" Copyright (c) 1987, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)fstat.1 8.3 (Berkeley) 2/25/94 .\" -.Dd September 5, 2011 +.Dd December 15, 2013 .Dt FSTAT 1 .Os .Sh NAME @@ -37,7 +37,7 @@ .Nd display status of open files .Sh SYNOPSIS .Nm -.Op Fl fnAv +.Op Fl Afnv .Op Fl M Ar core .Op Fl N Ar system .Op Fl p Ar pid @@ -55,6 +55,11 @@ reports on all open files in the system. .Pp Options: .Bl -tag -width Ds +.It Fl A +Add an output column with the address of the kernel object (vnode or file), +that can be matched with +.Xr pstat 8 +output. .It Fl f Restrict examination to files open in the same file systems as the named file arguments, or to the file system containing the @@ -87,11 +92,6 @@ and print the mode of the file in octal Report all files open by the specified process. .It Fl u Report all files open by the specified user. -.It Fl A -Add an output column with the address of the kernel object (vnode or file), -that can be matched with -.Xr pstat 8 -output. .It Fl v Verbose mode. Print error messages upon failures to locate particular
CVS commit: src/usr.bin/rpcgen
Module Name:src Committed By: wiz Date: Sun Dec 15 09:18:31 UTC 2013 Modified Files: src/usr.bin/rpcgen: rpc_main.c Log Message: Sync usage and option descriptions with manpage. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/usr.bin/rpcgen/rpc_main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/rpcgen/rpc_main.c diff -u src/usr.bin/rpcgen/rpc_main.c:1.38 src/usr.bin/rpcgen/rpc_main.c:1.39 --- src/usr.bin/rpcgen/rpc_main.c:1.38 Sun Dec 15 00:40:17 2013 +++ src/usr.bin/rpcgen/rpc_main.c Sun Dec 15 09:18:31 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rpc_main.c,v 1.38 2013/12/15 00:40:17 christos Exp $ */ +/* $NetBSD: rpc_main.c,v 1.39 2013/12/15 09:18:31 wiz Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = "@(#)rpc_main.c 1.30 89/03/30 (C) 1987 SMI"; #else -__RCSID("$NetBSD: rpc_main.c,v 1.38 2013/12/15 00:40:17 christos Exp $"); +__RCSID("$NetBSD: rpc_main.c,v 1.39 2013/12/15 09:18:31 wiz Exp $"); #endif #endif @@ -1102,12 +1102,12 @@ static void usage(void) { f_print(stderr, "usage: %s infile\n", cmdname); - f_print(stderr, "\t%s [-a][-b][-C][-Dname[=value]] -i size [-I [-K seconds]] [-A] [-M] [-N] [-T] infile\n", + f_print(stderr, "\t%s [-AaBbILMNTv] [-Dname[=value]] [-i size] [-K seconds] [-Y pathname] infile\n", cmdname); - f_print(stderr, "\t%s [-L] [-M] [-c | -h | -l | -m | -t | -Sc | -Ss] [-o outfile] [infile]\n", + f_print(stderr, "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss] [-o outfile] [infile]\n", cmdname); - f_print(stderr, "\t%s [-s nettype]* [-o outfile] [infile]\n", cmdname); - f_print(stderr, "\t%s [-n netid]* [-o outfile] [infile]\n", cmdname); + f_print(stderr, "\t%s [-s nettype] [-o outfile] [infile]\n", cmdname); + f_print(stderr, "\t%s [-n netid] [-o outfile] [infile]\n", cmdname); options_usage(); exit(1); } @@ -1118,25 +1118,27 @@ options_usage(void) f_print(stderr, "options:\n"); f_print(stderr, "-A\t\tgenerate svc_caller() function\n"); f_print(stderr, "-a\t\tgenerate all files, including samples\n"); + f_print(stderr, "-B\t\tgenerate BSD c++ macros\n"); f_print(stderr, "-b\t\tbackward compatibility mode (generates code for SunOS 4.1)\n"); f_print(stderr, "-c\t\tgenerate XDR routines\n"); f_print(stderr, "-Dname[=value]\tdefine a symbol (same as #define)\n"); f_print(stderr, "-h\t\tgenerate header file\n"); - f_print(stderr, "-i size\t\tsize at which to start generating inline code\n"); f_print(stderr, "-I\t\tgenerate code for inetd support in server (for SunOS 4.1)\n"); + f_print(stderr, "-i size\t\tsize at which to start generating inline code\n"); f_print(stderr, "-K seconds\tserver exits after K seconds of inactivity\n"); - f_print(stderr, "-l\t\tgenerate client side stubs\n"); f_print(stderr, "-L\t\tserver errors will be printed to syslog\n"); - f_print(stderr, "-m\t\tgenerate server side stubs\n"); + f_print(stderr, "-l\t\tgenerate client side stubs\n"); f_print(stderr, "-M\t\tgenerate thread-safe stubs\n"); - f_print(stderr, "-n netid\tgenerate server code that supports named netid\n"); + f_print(stderr, "-m\t\tgenerate server side stubs\n"); f_print(stderr, "-N\t\tsupports multiple arguments and call-by-value\n"); + f_print(stderr, "-n netid\tgenerate server code that supports named netid\n"); f_print(stderr, "-o outfile\tname of the output file\n"); f_print(stderr, "-s nettype\tgenerate server code that supports named nettype\n"); f_print(stderr, "-Sc\t\tgenerate sample client code that uses remote procedures\n"); f_print(stderr, "-Ss\t\tgenerate sample server code that defines remote procedures\n"); - f_print(stderr, "-t\t\tgenerate RPC dispatch table\n"); f_print(stderr, "-T\t\tgenerate code to support RPC dispatch tables\n"); + f_print(stderr, "-t\t\tgenerate RPC dispatch table\n"); + f_print(stderr, "-v\t\tdisplay version number\n"); f_print(stderr, "-Y path\t\tdirectory name to find C preprocessor (cpp)\n"); exit(1);
CVS commit: src/usr.bin/rpcgen
Module Name:src Committed By: wiz Date: Sun Dec 15 09:18:14 UTC 2013 Modified Files: src/usr.bin/rpcgen: rpcgen.1 Log Message: Standardize SYNOPSIS. Sort option descriptions and remove duplicates. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/usr.bin/rpcgen/rpcgen.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/rpcgen/rpcgen.1 diff -u src/usr.bin/rpcgen/rpcgen.1:1.23 src/usr.bin/rpcgen/rpcgen.1:1.24 --- src/usr.bin/rpcgen/rpcgen.1:1.23 Sun Dec 15 00:40:17 2013 +++ src/usr.bin/rpcgen/rpcgen.1 Sun Dec 15 09:18:14 2013 @@ -1,4 +1,4 @@ -.\" $NetBSD: rpcgen.1,v 1.23 2013/12/15 00:40:17 christos Exp $ +.\" $NetBSD: rpcgen.1,v 1.24 2013/12/15 09:18:14 wiz Exp $ .\" from: @(#)rpcgen.new.1 1.1 90/11/09 TIRPC 1.0; from 40.10 of 10/10/89 .\" Copyright (c) 1988,1990 Sun Microsystems, Inc. - All Rights Reserved. .Dd December 14, 2013 @@ -11,19 +11,10 @@ .Nm .Ar infile .Nm -.Op Fl A -.Op Fl a -.Op Fl B -.Op Fl b +.Op Fl AaBbILMNTv .Op Fl D Ar name Op =value -.Op Fl I .Op Fl i Ar size .Op Fl K Ar secs -.Op Fl L -.Op Fl M -.Op Fl N -.Op Fl T -.Op Fl v .Op Fl Y Ar pathname .Ar infile .Nm @@ -228,12 +219,12 @@ allows customization of routines. .Sh OPTIONS .Bl -tag -width indent -.It Fl a -Generate all the files including sample code for client and server side. .It Fl A Generate an .Fn svc_caller function. +.It Fl a +Generate all the files including sample code for client and server side. .It Fl B Generate BSD cplusplus macros (__BEGIN_DECLS, __END_DECLS). .It Fl b @@ -269,9 +260,6 @@ option can be used in conjunction to pro header file which supports .Tn RPC dispatch tables. -.It Fl i Ar size -Size to decide when to start generating inline code. -The default size is 3. .It Fl I Support .Xr inetd 8 @@ -284,6 +272,9 @@ in the background, unless .Dv RCP_SVC_FG is defined, or the server is compiled without .Fl I . +.It Fl i Ar size +Size to decide when to start generating inline code. +The default size is 3. .It Fl K Ar secs By default, services created using .Nm @@ -311,23 +302,11 @@ For such servers, .Nm should be used with .Dq Fl K No -1 . +.It Fl L +Server errors will be sent to syslog instead of stderr. .It Fl l Compile into client-side stubs. .Xr inetd 8 . -.It Fl I -Compile stubs meant for use in programs started by -.Xr inetd 8 . -.It Fl L -Server errors will be sent to syslog instead of stderr. -.It Fl m -Compile into server-side stubs, -but do not generate a -.Fn main -routine. -This option is useful for doing callback-routines -and for users who need to write their own -.Fn main -routine to do initialization. .It Fl M Generate thread-safe stubs. This alters the calling pattern of client and @@ -337,6 +316,15 @@ that all components for a particular ser wrappers, etc.) must be built either with or without the .Fl M flag. +.It Fl m +Compile into server-side stubs, +but do not generate a +.Fn main +routine. +This option is useful for doing callback-routines +and for users who need to write their own +.Fn main +routine to do initialization. .It Fl N Use the newstyle of .Nm . @@ -368,12 +356,6 @@ standard output is used .Fl m Fl n Fl s modes only .Pc -.It Fl n Ar netid -Specify the transport for the server-side stubs. -.Ar netid -should be defined in -.Xr netconfig 5 . -This option can be repeated in order to support more than one transport. .It Fl s Ar nettype Compile into server-side stubs for all the transports belonging to the class @@ -411,14 +393,14 @@ You would need to fill in the actual code for the remote procedures. .\" .It Fl S\&m .\" Generate a sample Makefile that can be used to compile the application. -.It Fl t -Compile into -.Tn RPC -dispatch table. .It Fl T Generate the code to support .Tn RPC dispatch tables. +.It Fl t +Compile into +.Tn RPC +dispatch table. .It Fl v Display the version number. .It Fl Y Ar pathname
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: skrll Date: Sun Dec 15 09:14:09 UTC 2013 Modified Files: src/sys/arch/arm/arm32: db_machdep.c Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/arm32/db_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/arm32/db_machdep.c diff -u src/sys/arch/arm/arm32/db_machdep.c:1.16 src/sys/arch/arm/arm32/db_machdep.c:1.17 --- src/sys/arch/arm/arm32/db_machdep.c:1.16 Sat Jan 5 15:06:51 2013 +++ src/sys/arch/arm/arm32/db_machdep.c Sun Dec 15 09:14:09 2013 @@ -1,35 +1,35 @@ -/* $NetBSD: db_machdep.c,v 1.16 2013/01/05 15:06:51 christos Exp $ */ +/* $NetBSD: db_machdep.c,v 1.17 2013/12/15 09:14:09 skrll Exp $ */ -/* +/* * Copyright (c) 1996 Mark Brinicombe * * Mach Operating System * Copyright (c) 1991,1990 Carnegie Mellon University * All Rights Reserved. - * + * * Permission to use, copy, modify and distribute this software and its * documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. - * + * * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * + * * Carnegie Mellon requests users of this software to return to - * + * * Software Distribution Coordinator or software.distribut...@cs.cmu.edu * School of Computer Science * Carnegie Mellon University * Pittsburgh PA 15213-3890 - * + * * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. */ #include -__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.16 2013/01/05 15:06:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.17 2013/12/15 09:14:09 skrll Exp $"); #include #include
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: skrll Date: Sun Dec 15 09:13:47 UTC 2013 Modified Files: src/sys/arch/arm/arm32: db_interface.c Log Message: Trailing whitespace. To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/sys/arch/arm/arm32/db_interface.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/arm32/db_interface.c diff -u src/sys/arch/arm/arm32/db_interface.c:1.49 src/sys/arch/arm/arm32/db_interface.c:1.50 --- src/sys/arch/arm/arm32/db_interface.c:1.49 Thu Feb 16 02:33:37 2012 +++ src/sys/arch/arm/arm32/db_interface.c Sun Dec 15 09:13:47 2013 @@ -1,29 +1,29 @@ -/* $NetBSD: db_interface.c,v 1.49 2012/02/16 02:33:37 christos Exp $ */ +/* $NetBSD: db_interface.c,v 1.50 2013/12/15 09:13:47 skrll Exp $ */ -/* +/* * Copyright (c) 1996 Scott K. Stevens * * Mach Operating System * Copyright (c) 1991,1990 Carnegie Mellon University * All Rights Reserved. - * + * * Permission to use, copy, modify and distribute this software and its * documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. - * + * * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * + * * Carnegie Mellon requests users of this software to return to - * + * * Software Distribution Coordinator or software.distribut...@cs.cmu.edu * School of Computer Science * Carnegie Mellon University * Pittsburgh PA 15213-3890 - * + * * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.49 2012/02/16 02:33:37 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.50 2013/12/15 09:13:47 skrll Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -165,7 +165,7 @@ db_read_bytes(vaddr_t addr, size_t size, static void db_write_text(vaddr_t addr, size_t size, const char *data) -{ +{ struct pmap *pmap = pmap_kernel(); pd_entry_t *pde, oldpde, tmppde; pt_entry_t *pte, oldpte, tmppte;
CVS commit: src/usr.bin/fstat
Module Name:src Committed By: mlelstv Date: Sun Dec 15 08:16:24 UTC 2013 Modified Files: src/usr.bin/fstat: fstat.1 fstat.c Log Message: New -A option. Add an output column with the address of the kernel object (vnode or file) that can be matched with prstat(8) output. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/usr.bin/fstat/fstat.1 cvs rdiff -u -r1.103 -r1.104 src/usr.bin/fstat/fstat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/fstat/fstat.1 diff -u src/usr.bin/fstat/fstat.1:1.31 src/usr.bin/fstat/fstat.1:1.32 --- src/usr.bin/fstat/fstat.1:1.31 Wed Oct 3 19:35:08 2012 +++ src/usr.bin/fstat/fstat.1 Sun Dec 15 08:16:24 2013 @@ -1,4 +1,4 @@ -.\" $NetBSD: fstat.1,v 1.31 2012/10/03 19:35:08 wiz Exp $ +.\" $NetBSD: fstat.1,v 1.32 2013/12/15 08:16:24 mlelstv Exp $ .\" .\" Copyright (c) 1987, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -37,7 +37,7 @@ .Nd display status of open files .Sh SYNOPSIS .Nm -.Op Fl fnv +.Op Fl fnAv .Op Fl M Ar core .Op Fl N Ar system .Op Fl p Ar pid @@ -87,6 +87,11 @@ and print the mode of the file in octal Report all files open by the specified process. .It Fl u Report all files open by the specified user. +.It Fl A +Add an output column with the address of the kernel object (vnode or file), +that can be matched with +.Xr pstat 8 +output. .It Fl v Verbose mode. Print error messages upon failures to locate particular Index: src/usr.bin/fstat/fstat.c diff -u src/usr.bin/fstat/fstat.c:1.103 src/usr.bin/fstat/fstat.c:1.104 --- src/usr.bin/fstat/fstat.c:1.103 Sat Oct 19 15:56:05 2013 +++ src/usr.bin/fstat/fstat.c Sun Dec 15 08:16:24 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: fstat.c,v 1.103 2013/10/19 15:56:05 christos Exp $ */ +/* $NetBSD: fstat.c,v 1.104 2013/12/15 08:16:24 mlelstv Exp $ */ /*- * Copyright (c) 1988, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19 #if 0 static char sccsid[] = "@(#)fstat.c 8.3 (Berkeley) 5/2/95"; #else -__RCSID("$NetBSD: fstat.c,v 1.103 2013/10/19 15:56:05 christos Exp $"); +__RCSID("$NetBSD: fstat.c,v 1.104 2013/12/15 08:16:24 mlelstv Exp $"); #endif #endif /* not lint */ @@ -133,6 +133,7 @@ static int fsflg, /* show files on same uflg; /* show files open by a particular (effective) user */ static int checkfile; /* true if restricting to particular files or filesystems */ static int nflg; /* (numerical) display f.s. and rdev as dev_t */ +static int Aflg; /* prefix with address of file structure */ int vflg; /* display errors in locating kernel data objects etc... */ static fdfile_t **ofiles; /* buffer of pointers to file structures */ @@ -175,7 +176,7 @@ static void misctrans(struct file *, int static int ufs_filestat(struct vnode *, struct filestat *); static void usage(void) __dead; static const char *vfilestat(struct vnode *, struct filestat *); -static void vtrans(struct vnode *, int, int); +static void vtrans(struct vnode *, int, int, long); static void ftrans(fdfile_t *, int); static void ptrans(struct file *, struct pipe *, int); static void kdriver_init(void); @@ -195,7 +196,7 @@ main(int argc, char **argv) arg = 0; what = KERN_PROC_ALL; nlistf = memf = NULL; - while ((ch = getopt(argc, argv, "fnp:u:vN:M:")) != -1) + while ((ch = getopt(argc, argv, "fnAp:u:vN:M:")) != -1) switch((char)ch) { case 'f': fsflg = 1; @@ -209,6 +210,9 @@ main(int argc, char **argv) case 'n': nflg = 1; break; + case 'A': + Aflg = 1; + break; case 'p': if (pflg++) usage(); @@ -277,6 +281,8 @@ main(int argc, char **argv) if ((p = kvm_getproc2(kd, what, arg, sizeof *p, &cnt)) == NULL) { errx(1, "%s", kvm_geterr(kd)); } + if (Aflg) + (void)printf("%-*s ", 2*(int)(sizeof(void*)), "ADDR"); if (nflg) (void)printf("%s", "USER CMD PID FD DEV INUM MODE SZ|DV R/W"); @@ -444,11 +450,11 @@ dofiles(struct kinfo_proc2 *p) * root directory vnode, if one */ if (cwdi.cwdi_rdir) - vtrans(cwdi.cwdi_rdir, RDIR, FREAD); + vtrans(cwdi.cwdi_rdir, RDIR, FREAD, (long)cwdi.cwdi_rdir); /* * current working directory vnode */ - vtrans(cwdi.cwdi_cdir, CDIR, FREAD); + vtrans(cwdi.cwdi_cdir, CDIR, FREAD, (long)cwdi.cwdi_cdir); #if 0 /* * Disable for now, since p->p_tracep appears to point to a ktr_desc * @@ -496,9 +502,12 @@ ftrans(fdfile_t *fp, int i) i, fdfile.ff_file, Pid); return; } + if (Aflg && file.f_type != DTYPE_VNODE) + (void)printf("%*lx ", + 2*(int)(sizeof(void*)), (long)fdfile.ff_file); switch (file.f_type) { case DTYPE_VNODE: - vtrans(file.f_data, i, file.f_flag); + vtrans(file.f_data, i, file.f_flag, (long)fdfile.ff_file); break; case DTYPE_SOCKET: if (checkfile == 0) @@ -590,7 +599,7 @@ vfilestat(struct vnode *vp, struct files } static void -vtrans(struct vnode *vp, int i, int flag) +vtrans(struct vnode *vp