CVS commit: src/usr.sbin/perfused
Module Name:src Committed By: manu Date: Fri Dec 12 09:58:39 UTC 2014 Modified Files: src/usr.sbin/perfused: perfused.c Log Message: Survive if filesystem installs a signal handler We tested for signal(3) to return 0 for success, which is incorrect: signal(3) returns the previous handler. Success should be tested as != SIG_ERR, otherwise we fail when a signal handler was previously installed by perfused(8) parrent process, which happens to be the FUSE filesystem. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/usr.sbin/perfused/perfused.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.sbin/perfused/perfused.c diff -u src/usr.sbin/perfused/perfused.c:1.24 src/usr.sbin/perfused/perfused.c:1.25 --- src/usr.sbin/perfused/perfused.c:1.24 Sat Jul 21 05:49:42 2012 +++ src/usr.sbin/perfused/perfused.c Fri Dec 12 09:58:39 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: perfused.c,v 1.24 2012/07/21 05:49:42 manu Exp $ */ +/* $NetBSD: perfused.c,v 1.25 2014/12/12 09:58:39 manu Exp $ */ /*- * Copyright (c) 2010 Emmanuel Dreyfus. All rights reserved. @@ -298,7 +298,7 @@ new_mount(int fd, int pmnt_flags) "could not open \"%s\"", _PATH_VAR_RUN_PERFUSE_TRACE); - if (signal(SIGUSR1, sigusr1_handler) != 0) + if (signal(SIGUSR1, sigusr1_handler) == SIG_ERR) DERR(EX_OSERR, "signal failed"); /* @@ -399,7 +399,7 @@ parse_options(int argc, char **argv) perfuse_diagflags |= parse_debug(optarg); break; case 's': - if (signal(SIGINFO, siginfo_handler) != 0) + if (signal(SIGINFO, siginfo_handler) == SIG_ERR) DERR(EX_OSERR, "signal failed"); break; case 'f':
CVS commit: src/sys/arch/bebox/stand/boot
Module Name:src Committed By: phx Date: Fri Dec 12 15:57:30 UTC 2014 Modified Files: src/sys/arch/bebox/stand/boot: fd.c siop.c vreset.c Log Message: Fix all warnings when compiling with gcc 4.8. BeBox should be ready for 4.8 now. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/bebox/stand/boot/fd.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/bebox/stand/boot/siop.c cvs rdiff -u -r1.13 -r1.14 src/sys/arch/bebox/stand/boot/vreset.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/bebox/stand/boot/fd.c diff -u src/sys/arch/bebox/stand/boot/fd.c:1.10 src/sys/arch/bebox/stand/boot/fd.c:1.11 --- src/sys/arch/bebox/stand/boot/fd.c:1.10 Thu Oct 14 06:39:52 2010 +++ src/sys/arch/bebox/stand/boot/fd.c Fri Dec 12 15:57:30 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: fd.c,v 1.10 2010/10/14 06:39:52 kiyohara Exp $ */ +/* $NetBSD: fd.c,v 1.11 2014/12/12 15:57:30 phx Exp $ */ /*- * Copyright (C) 1997-1998 Kazuki Sakamoto (sakam...@netbsd.org) @@ -297,7 +297,7 @@ fdstrategy(void *devdata, int func, dadd int ctlr = un->ctlr; int unit = un->unit; int *stat = un->stat; - long nblock, blknum; + long blknum; int fd_skip = 0; u_char *cbuf = (u_char *)buf; @@ -306,7 +306,6 @@ fdstrategy(void *devdata, int func, dadd } fdDriveStatus(ctlr, unit, 0, stat); - nblock = un->un_type->maxseccount; sectrac = un->un_type->seccount; /* sector per track */ *rsize = 0; Index: src/sys/arch/bebox/stand/boot/siop.c diff -u src/sys/arch/bebox/stand/boot/siop.c:1.4 src/sys/arch/bebox/stand/boot/siop.c:1.5 --- src/sys/arch/bebox/stand/boot/siop.c:1.4 Sat Jun 14 20:50:12 2014 +++ src/sys/arch/bebox/stand/boot/siop.c Fri Dec 12 15:57:30 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: siop.c,v 1.4 2014/06/14 20:50:12 phx Exp $ */ +/* $NetBSD: siop.c,v 1.5 2014/12/12 15:57:30 phx Exp $ */ /* * Copyright (c) 2010 KIYOHARA Takashi * All rights reserved. @@ -625,7 +625,7 @@ siop_start(struct siop_adapter *adp, str { struct siop_xfer *siop_xfer = adp->xfer; uint32_t dsa, *script = adp->script; - int target, lun, slot; + int slot; void *scriptaddr = (void *)local_to_PCI((u_long)script); const int siop_common_xfer_size = sizeof(struct siop_common_xfer); @@ -652,8 +652,6 @@ siop_start(struct siop_adapter *adp, str } else { slot++; } - target = xs->target; - lun = xs->lun; /* * find a free scheduler slot and load it. */ Index: src/sys/arch/bebox/stand/boot/vreset.c diff -u src/sys/arch/bebox/stand/boot/vreset.c:1.13 src/sys/arch/bebox/stand/boot/vreset.c:1.14 --- src/sys/arch/bebox/stand/boot/vreset.c:1.13 Fri Oct 15 20:01:03 2010 +++ src/sys/arch/bebox/stand/boot/vreset.c Fri Dec 12 15:57:30 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: vreset.c,v 1.13 2010/10/15 20:01:03 he Exp $ */ +/* $NetBSD: vreset.c,v 1.14 2014/12/12 15:57:30 phx Exp $ */ /* * Copyright (C) 1995-1997 Gary Thomas (g...@linuxppc.org) @@ -547,8 +547,8 @@ delayLoop(int k) static void writeAttr(u_char index, u_char data, u_char videoOn) { - u_char v; - v = inb(0x3da); /* reset attr. address toggle */ + + (void)inb(0x3da); /* reset attr. address toggle */ if (videoOn) outb(0x3c0, (index & 0x1F) | 0x20); else
CVS commit: [netbsd-7] src
Module Name:src Committed By: martin Date: Fri Dec 12 16:38:49 UTC 2014 Modified Files: src/distrib/sets/lists/man [netbsd-7]: mi src/share/man/man7 [netbsd-7]: Makefile Log Message: Pull up following revision(s) (requested by msaitoh in ticket #309): share/man/man7/Makefile: revision 1.31 distrib/sets/lists/man/mi: revision 1.1491 Add missing src(7) reported by Patrick Welche. To generate a diff of this commit: cvs rdiff -u -r1.1485.2.3 -r1.1485.2.4 src/distrib/sets/lists/man/mi cvs rdiff -u -r1.30 -r1.30.4.1 src/share/man/man7/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/man/mi diff -u src/distrib/sets/lists/man/mi:1.1485.2.3 src/distrib/sets/lists/man/mi:1.1485.2.4 --- src/distrib/sets/lists/man/mi:1.1485.2.3 Thu Nov 27 11:36:25 2014 +++ src/distrib/sets/lists/man/mi Fri Dec 12 16:38:48 2014 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1485.2.3 2014/11/27 11:36:25 martin Exp $ +# $NetBSD: mi,v 1.1485.2.4 2014/12/12 16:38:48 martin Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -2242,6 +2242,7 @@ ./usr/share/man/cat7/security.0 man-reference-catman .cat ./usr/share/man/cat7/setuid.0 man-reference-catman .cat ./usr/share/man/cat7/signal.0 man-reference-catman .cat +./usr/share/man/cat7/src.0 man-reference-catman .cat ./usr/share/man/cat7/sticky.0 man-reference-catman .cat ./usr/share/man/cat7/symlink.0 man-reference-catman .cat ./usr/share/man/cat7/sysctl.0 man-reference-catman .cat @@ -5189,6 +5190,7 @@ ./usr/share/man/html7/security.html man-reference-htmlman html ./usr/share/man/html7/setuid.html man-reference-htmlman html ./usr/share/man/html7/signal.html man-reference-htmlman html +./usr/share/man/html7/src.html man-reference-htmlman html ./usr/share/man/html7/sticky.html man-reference-htmlman html ./usr/share/man/html7/symlink.html man-reference-htmlman html ./usr/share/man/html7/sysctl.html man-reference-htmlman html @@ -8112,6 +8114,7 @@ ./usr/share/man/man7/security.7 man-reference-man .man ./usr/share/man/man7/setuid.7 man-reference-man .man ./usr/share/man/man7/signal.7 man-reference-man .man +./usr/share/man/man7/src.7 man-reference-man .man ./usr/share/man/man7/sticky.7 man-reference-man .man ./usr/share/man/man7/symlink.7 man-reference-man .man ./usr/share/man/man7/sysctl.7 man-reference-man .man Index: src/share/man/man7/Makefile diff -u src/share/man/man7/Makefile:1.30 src/share/man/man7/Makefile:1.30.4.1 --- src/share/man/man7/Makefile:1.30 Wed Jul 31 11:57:24 2013 +++ src/share/man/man7/Makefile Fri Dec 12 16:38:48 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.30 2013/07/31 11:57:24 gdt Exp $ +# $NetBSD: Makefile,v 1.30.4.1 2014/12/12 16:38:48 martin Exp $ # @(#)Makefile 8.1 (Berkeley) 6/5/93 .include @@ -7,8 +7,8 @@ MAN= ascii.7 c.7 environ.7 glob.7 hier.7 hostname.7 intro.7 mailaddr.7 \ module.7 nls.7 operator.7 orders.7 pkgsrc.7 release.7 rfc6056.7 \ - security.7 script.7 setuid.7 signal.7 sticky.7 symlink.7 sysctl.7 \ - tests.7 + security.7 script.7 setuid.7 signal.7 src.7 sticky.7 symlink.7 \ + sysctl.7 tests.7 CLEANFILES= tests.7 .if ${MKKYUA} != "no"
CVS commit: [netbsd-7] src
Module Name:src Committed By: martin Date: Fri Dec 12 16:44:35 UTC 2014 Modified Files: src/sys/arch/x86/include [netbsd-7]: cacheinfo.h specialreg.h src/usr.sbin/cpuctl/arch [netbsd-7]: i386.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #310): sys/arch/x86/include/specialreg.h: revision 1.79-1.80 usr.sbin/cpuctl/arch/i386.c: revision 1.59 sys/arch/x86/include/cacheinfo.h: revision 1.19 Update some cpuid related values: - Add XSAVECC, XGETBV, XSAVES, SMAP and PQE - Change XINUSE to XGETBV - Add new cache descripter value (0xc3) - Update signatures for the follwing CPUs: - Core M-5xxx - Core i7 Extreme - Future Core (0x4e) - Future Xeon (0x56) To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.18.2.1 src/sys/arch/x86/include/cacheinfo.h cvs rdiff -u -r1.78 -r1.78.4.1 src/sys/arch/x86/include/specialreg.h cvs rdiff -u -r1.58 -r1.58.2.1 src/usr.sbin/cpuctl/arch/i386.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/x86/include/cacheinfo.h diff -u src/sys/arch/x86/include/cacheinfo.h:1.18 src/sys/arch/x86/include/cacheinfo.h:1.18.2.1 --- src/sys/arch/x86/include/cacheinfo.h:1.18 Thu Jul 3 17:24:33 2014 +++ src/sys/arch/x86/include/cacheinfo.h Fri Dec 12 16:44:35 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: cacheinfo.h,v 1.18 2014/07/03 17:24:33 msaitoh Exp $ */ +/* $NetBSD: cacheinfo.h,v 1.18.2.1 2014/12/12 16:44:35 martin Exp $ */ #ifndef _X86_CACHEINFO_H_ #define _X86_CACHEINFO_H_ @@ -247,6 +247,7 @@ __CI_TBL(CAI_DTLB, 0xba,4, 64, __CI_TBL(CAI_DTLB2,0xc0,4, 8,4 * 1024, "4K/4M: 8 entries"), \ __CI_TBL(CAI_L2_STLB2, 0xc1,8,1024, 4 * 1024, "4K/2M: 1024 entries"), \ __CI_TBL(CAI_DTLB2,0xc2,4, 16,4 * 1024, "4K/2M: 16 entries"), \ +__CI_TBL(CAI_L2_STLB, 0xc3,6,1536, 4 * 1024, NULL), \ __CI_TBL(CAI_L2_STLB, 0xca,4,512,4 * 1024, NULL), \ __CI_TBL(CAI_ICACHE, 0x06,4,8 * 1024, 32, NULL), \ __CI_TBL(CAI_ICACHE, 0x08,4, 16 * 1024, 32, NULL), \ Index: src/sys/arch/x86/include/specialreg.h diff -u src/sys/arch/x86/include/specialreg.h:1.78 src/sys/arch/x86/include/specialreg.h:1.78.4.1 --- src/sys/arch/x86/include/specialreg.h:1.78 Tue Feb 25 22:11:11 2014 +++ src/sys/arch/x86/include/specialreg.h Fri Dec 12 16:44:35 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: specialreg.h,v 1.78 2014/02/25 22:11:11 dsl Exp $ */ +/* $NetBSD: specialreg.h,v 1.78.4.1 2014/12/12 16:44:35 martin Exp $ */ /*- * Copyright (c) 1991 The Regents of the University of California. @@ -87,6 +87,7 @@ #define CR4_PCIDE 0x0002 /* enable Process Context IDentifiers */ #define CR4_OSXSAVE 0x0004 /* enable xsave and xrestore */ #define CR4_SMEP 0x0010 /* enable SMEP support */ +#define CR4_SMAP 0x0020 /* enable SMAP support */ /* * Extended Control Register XCR0 @@ -315,6 +316,7 @@ #define CPUID_SEF_QM __BIT(12) #define CPUID_SEF_FPUCSDS __BIT(13) #define CPUID_SEF_MPX __BIT(14) +#define CPUID_SEF_PQE __BIT(15) #define CPUID_SEF_AVX512F __BIT(16) #define CPUID_SEF_RDSEED __BIT(18) #define CPUID_SEF_ADX __BIT(19) @@ -329,7 +331,7 @@ "\1" "FSGSBASE" "\2" "TSCADJUST" "\4" "BMI1" \ "\5" "HLE" "\6" "AVX2" "\10" "SMEP" \ "\11" "BMI2" "\12" "ERMS" "\13" "INVPCID" "\14" "RTM" \ - "\15" "QM" "\16" "FPUCSDS" "\17" "MPX" \ + "\15" "QM" "\16" "FPUCSDS" "\17" "MPX" "\20" "PQE" \ "\21" "AVX512F" "\23" "RDSEED" "\24" "ADX" \ "\25" "SMAP" \ "\32" "PT" "\33" "AVX512PF""\34" "AVX512ER"\ @@ -355,9 +357,12 @@ */ #define CPUID_PES1_XSAVEOPT 0x0001 /* xsaveopt instruction */ +#define CPUID_PES1_XSAVEC 0x0002 /* xsavec & compacted XRSTOR */ +#define CPUID_PES1_XGETBV 0x0004 /* xgetbv with ECX = 1 */ +#define CPUID_PES1_XSAVES 0x0008 /* xsaves/xrstors, IA32_XSS */ #define CPUID_PES1_FLAGS "\20" \ - "\1" "XSAVEOPT" + "\1" "XSAVEOPT" "\2" "XSAVEC" "\3" "XGETBV" "\4" "XSAVES" /* Intel Fn8001 extended features - %edx */ #define CPUID_SYSCALL 0x0800 /* SYSCALL/SYSRET */ Index: src/usr.sbin/cpuctl/arch/i386.c diff -u src/usr.sbin/cpuctl/arch/i386.c:1.58 src/usr.sbin/cpuctl/arch/i386.c:1.58.2.1 --- src/usr.sbin/cpuctl/arch/i386.c:1.58 Fri Jul 25 14:18:49 2014 +++ src/usr.sbin/cpuctl/arch/i386.c Fri Dec 12 16:44:35 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: i386.c,v 1.58 2014/07/25 14:18:49 msaitoh Exp $ */ +/* $NetBSD: i386.c,v 1.58.2.1 2014/12/12 16:44:35 martin Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -57,7 +57,7 @@ #include #ifndef lint -__RCSID("$NetBSD: i386.c,v 1.58 2014/07/25 14:18:49 msaitoh Exp $"); +__RCSID("$NetBSD: i386.c,v 1.58.2.1 2014/12/12 16:44:35 martin Exp $"); #endif /* not lint */ #include @@ -353,15 +353,19 @@ const struct cpu_cpuid_nameclass i386_cp "Ivy Bridge", [0x3c] = "4th gen Core,
CVS commit: [netbsd-7] src/sys/dev/pci
Module Name:src Committed By: martin Date: Fri Dec 12 18:56:16 UTC 2014 Modified Files: src/sys/dev/pci [netbsd-7]: pcireg.h ppb.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #311): sys/dev/pci/ppb.c: revision 1.53 sys/dev/pci/ppb.c: revision 1.54 sys/dev/pci/pcireg.h: revision 1.96 - Modify message of PCIe capability version. This field (PCIE_XCAP_VER_MASK) is not specification's version number but the capability structure's version number. To avoid confusion, print "PCI Express capability version x". - The max number of PCIe lane is not 16 but 32. Fix the bug using with macro. - Use macro instead of magic number. - Gb/s -> GT/s Rename PCIE_XCAP_VER_* macros to avoid confusion. To generate a diff of this commit: cvs rdiff -u -r1.95 -r1.95.2.1 src/sys/dev/pci/pcireg.h cvs rdiff -u -r1.52 -r1.52.10.1 src/sys/dev/pci/ppb.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/pci/pcireg.h diff -u src/sys/dev/pci/pcireg.h:1.95 src/sys/dev/pci/pcireg.h:1.95.2.1 --- src/sys/dev/pci/pcireg.h:1.95 Mon Jun 9 11:08:05 2014 +++ src/sys/dev/pci/pcireg.h Fri Dec 12 18:56:16 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pcireg.h,v 1.95 2014/06/09 11:08:05 msaitoh Exp $ */ +/* $NetBSD: pcireg.h,v 1.95.2.1 2014/12/12 18:56:16 martin Exp $ */ /* * Copyright (c) 1995, 1996, 1999, 2000 @@ -816,8 +816,8 @@ typedef u_int8_t pci_revision_t; #define PCIE_XCAP_MASK __BITS(31, 16) /* Capability Version */ #define PCIE_XCAP_VER_MASK __SHIFTIN(__BITS(3, 0), PCIE_XCAP_MASK) -#define PCIE_XCAP_VER_1_0 __SHIFTIN(1, PCIE_XCAP_VER_MASK) -#define PCIE_XCAP_VER_2_0 __SHIFTIN(2, PCIE_XCAP_VER_MASK) +#define PCIE_XCAP_VER_1 __SHIFTIN(1, PCIE_XCAP_VER_MASK) +#define PCIE_XCAP_VER_2 __SHIFTIN(2, PCIE_XCAP_VER_MASK) #define PCIE_XCAP_TYPE_MASK __SHIFTIN(__BITS(7, 4), PCIE_XCAP_MASK) #define PCIE_XCAP_TYPE_PCIE_DEV __SHIFTIN(0x0, PCIE_XCAP_TYPE_MASK) #define PCIE_XCAP_TYPE_PCI_DEV __SHIFTIN(0x1, PCIE_XCAP_TYPE_MASK) Index: src/sys/dev/pci/ppb.c diff -u src/sys/dev/pci/ppb.c:1.52 src/sys/dev/pci/ppb.c:1.52.10.1 --- src/sys/dev/pci/ppb.c:1.52 Sun Apr 21 19:59:41 2013 +++ src/sys/dev/pci/ppb.c Fri Dec 12 18:56:16 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ppb.c,v 1.52 2013/04/21 19:59:41 msaitoh Exp $ */ +/* $NetBSD: ppb.c,v 1.52.10.1 2014/12/12 18:56:16 martin Exp $ */ /* * Copyright (c) 1996, 1998 Christopher G. Demetriou. All rights reserved. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ppb.c,v 1.52 2013/04/21 19:59:41 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ppb.c,v 1.52.10.1 2014/12/12 18:56:16 martin Exp $"); #include #include @@ -108,17 +108,17 @@ ppb_fix_pcie(device_t self) &off, ®)) return; /* Not a PCIe device */ - aprint_normal_dev(self, "PCI Express "); + aprint_normal_dev(self, "PCI Express capability version "); switch (reg & PCIE_XCAP_VER_MASK) { - case PCIE_XCAP_VER_1_0: - aprint_normal("1.0"); + case PCIE_XCAP_VER_1: + aprint_normal("1"); break; - case PCIE_XCAP_VER_2_0: - aprint_normal("2.0"); + case PCIE_XCAP_VER_2: + aprint_normal("2"); break; default: aprint_normal_dev(self, - "version unsupported (0x%" PRIxMAX ")\n", + "unsupported (0x%" PRIxMAX ")\n", __SHIFTOUT(reg, PCIE_XCAP_VER_MASK)); return; } @@ -155,29 +155,31 @@ ppb_fix_pcie(device_t self) case PCIE_XCAP_TYPE_ROOT: case PCIE_XCAP_TYPE_DOWN: case PCIE_XCAP_TYPE_PCI2PCIE: - reg = pci_conf_read(sc->sc_pc, sc->sc_tag, off + 0x0c); - u_int mlw = (reg >> 4) & 0x1f; - u_int mls = (reg >> 0) & 0x0f; + reg = pci_conf_read(sc->sc_pc, sc->sc_tag, off + PCIE_LCAP); + u_int mlw = __SHIFTOUT(reg, PCIE_LCAP_MAX_WIDTH); + u_int mls = __SHIFTOUT(reg, PCIE_LCAP_MAX_SPEED); + if (mls < __arraycount(pcie_linkspeed_strings)) { - aprint_normal("> x%d @ %sGb/s\n", + aprint_normal("> x%d @ %sGT/s\n", mlw, pcie_linkspeed_strings[mls]); } else { - aprint_normal("> x%d @ %d.%dGb/s\n", + aprint_normal("> x%d @ %d.%dGT/s\n", mlw, (mls * 25) / 10, (mls * 25) % 10); } - reg = pci_conf_read(sc->sc_pc, sc->sc_tag, off + 0x10); - if (reg & __BIT(29)) { /* DLLA */ - u_int lw = (reg >> 20) & 0x1f; - u_int ls = (reg >> 16) & 0x0f; + reg = pci_conf_read(sc->sc_pc, sc->sc_tag, off + PCIE_LCSR); + if (reg & PCIE_LCSR_DLACTIVE) { /* DLLA */ + u_int lw = __SHIFTOUT(reg, PCIE_LCSR_NLW); + u_int ls = __SHIFTOUT(reg, PCIE_LCSR_LINKSPEED); + if (lw != mlw || ls != mls) { if (ls < __arraycount(pcie_linkspeed_strings)) { aprint_normal_dev(self, - "link is x%d @ %sGb/s\n", + "link is x%d @ %sGT/s\n", lw, pcie_linkspeed_strings[ls]); } else { aprint_normal_dev(self, - "link is x%d @ %d.%dGb/s\n", + "link is x%d @ %d.%dGT/s\n", lw, (ls * 25) / 10, (ls * 25) % 10); } }
CVS commit: [netbsd-7] src/sys/dev/pci
Module Name:src Committed By: martin Date: Fri Dec 12 19:03:17 UTC 2014 Modified Files: src/sys/dev/pci [netbsd-7]: pci_subr.c pcireg.h Log Message: Pull up following revision(s) (requested by msaitoh in ticket #312): sys/dev/pci/pci_subr.c: revision 1.130 sys/dev/pci/pci_subr.c: revision 1.131 sys/dev/pci/pci_subr.c: revision 1.132 sys/dev/pci/pcireg.h: revision 1.97 sys/dev/pci/pcireg.h: revision 1.98 sys/dev/pci/pcireg.h: revision 1.99 sys/dev/pci/pci_subr.c: revision 1.127 sys/dev/pci/pci_subr.c: revision 1.128 sys/dev/pci/pci_subr.c: revision 1.129 Always print the Slot implemented bit in the PCIe Capabilities Register using with onoff(). - Add some PCI subclass and interfaces. - The interface of PCI_SUBCLASS_BRIDGE_RACEWAY is not decoded yet. - Fix typo in a message. - Add comment. - Modify comment. s/genric/generic/ Add comment. Fix typo in comment. Fix a bug that the specification revision of the Power Management function was incorrectly printed in the output of capability "list". The value is also printed in the detail output and it has no bug. - Cleanup pci_conf_print_caplist. Use table. The reason why it loops twice is that some capabilities appear multiple times (e.g. HyperTransport cap). - Print the specification revision of Power Management and AGP not in the capability list part but in the detail part. Add some HyperTransport related defines. It's required for the MSI. To generate a diff of this commit: cvs rdiff -u -r1.124 -r1.124.2.1 src/sys/dev/pci/pci_subr.c cvs rdiff -u -r1.95.2.1 -r1.95.2.2 src/sys/dev/pci/pcireg.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/dev/pci/pci_subr.c diff -u src/sys/dev/pci/pci_subr.c:1.124 src/sys/dev/pci/pci_subr.c:1.124.2.1 --- src/sys/dev/pci/pci_subr.c:1.124 Mon Jun 9 11:08:05 2014 +++ src/sys/dev/pci/pci_subr.c Fri Dec 12 19:03:17 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_subr.c,v 1.124 2014/06/09 11:08:05 msaitoh Exp $ */ +/* $NetBSD: pci_subr.c,v 1.124.2.1 2014/12/12 19:03:17 martin Exp $ */ /* * Copyright (c) 1997 Zubin D. Dittia. All rights reserved. @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.124 2014/06/09 11:08:05 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.124.2.1 2014/12/12 19:03:17 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_pci.h" @@ -88,7 +88,7 @@ static const struct pci_class pci_subcla /* * Class 0x01. - * Mass strage controller + * Mass storage controller */ /* ATA programming interface */ @@ -100,7 +100,16 @@ static const struct pci_class pci_interf /* SATA programming interface */ static const struct pci_class pci_interface_sata[] = { + { "vendor specific", PCI_INTERFACE_SATA_VND, NULL, }, { "AHCI 1.0", PCI_INTERFACE_SATA_AHCI10, NULL, }, + { "Serial Storage Bus Interface", PCI_INTERFACE_SATA_SSBI, NULL, }, + { NULL, 0,NULL, }, +}; + +/* Flash programming interface */ +static const struct pci_class pci_interface_nvm[] = { + { "vendor specific", PCI_INTERFACE_NVM_VND, NULL, }, + { "NVMHCI 1.0", PCI_INTERFACE_NVM_NVMHCI10, NULL, }, { NULL, 0,NULL, }, }; @@ -116,7 +125,8 @@ static const struct pci_class pci_subcla { "SATA", PCI_SUBCLASS_MASS_STORAGE_SATA, pci_interface_sata, }, { "SAS", PCI_SUBCLASS_MASS_STORAGE_SAS, NULL, }, - { "NVM", PCI_SUBCLASS_MASS_STORAGE_NVM, NULL, }, + { "Flash", PCI_SUBCLASS_MASS_STORAGE_NVM, + pci_interface_nvm, }, { "miscellaneous", PCI_SUBCLASS_MASS_STORAGE_MISC, NULL, }, { NULL, 0,NULL, }, }; @@ -165,7 +175,7 @@ static const struct pci_class pci_subcla { "video", PCI_SUBCLASS_MULTIMEDIA_VIDEO, NULL, }, { "audio", PCI_SUBCLASS_MULTIMEDIA_AUDIO, NULL, }, { "telephony", PCI_SUBCLASS_MULTIMEDIA_TELEPHONY, NULL,}, - { "HD audio", PCI_SUBCLASS_MULTIMEDIA_HDAUDIO, NULL, }, + { "mixed mode", PCI_SUBCLASS_MULTIMEDIA_HDAUDIO, NULL, }, { "miscellaneous", PCI_SUBCLASS_MULTIMEDIA_MISC, NULL, }, { NULL, 0,NULL, }, }; @@ -193,13 +203,20 @@ static const struct pci_class pci_interf { NULL, 0,NULL, }, }; -/* Semi-transparent PCI-toPCI bridge programming interface */ +/* Semi-transparent PCI-to-PCI bridge programming interface */ static const struct pci_class pci_interface_stpci[] = { { "primary side facing host", PCI_INTERFACE_STPCI_PRIMARY, NULL, }, { "secondary side facing host", PCI_INTERFACE_STPCI_SECONDARY, NULL, }, { NULL, 0,NULL, }, }; +/* Advanced Switching programming interface */ +static const struct pci_class pci_interface_advsw[] = { + { "custom interface", PCI_INTERFACE_ADVSW_CUSTOM, NULL, }, + { "ASI-SIG", PCI_INTERFACE_ADVSW_ASISIG, NULL, }, + { NULL, 0,NULL, }, +}; + /* Subclasses */ static const struct pci_class pci_subclass_bridge[] = { { "host", PCI_SUBCLASS_BRIDGE_HOST, NULL, }, @@ -215,6 +232,8 @@ static const struct
CVS commit: [netbsd-7] src/sys/arch
Module Name:src Committed By: martin Date: Fri Dec 12 19:07:46 UTC 2014 Modified Files: src/sys/arch/amd64/amd64 [netbsd-7]: db_disasm.c src/sys/arch/i386/i386 [netbsd-7]: db_disasm.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #313): sys/arch/amd64/amd64/db_disasm.c: revision 1.20 sys/arch/i386/i386/db_disasm.c: revision 1.41 sys/arch/i386/i386/db_disasm.c: revision 1.42 sys/arch/i386/i386/db_disasm.c: revision 1.43 sys/arch/i386/i386/db_disasm.c: revision 1.44 sys/arch/amd64/amd64/db_disasm.c: revision 1.17 sys/arch/amd64/amd64/db_disasm.c: revision 1.18 sys/arch/amd64/amd64/db_disasm.c: revision 1.19 KNF. No binary change. No functional change. - 0 -> NULL - Don't use cast. - Style fix. - Fix typos in comment. Fix bugs: - aaa and daa were reversed. Same as *BSDs. - fix operand order of shld and shrd. Same as *BSDs. Add support for sysenter, sysexit, vmptrld, vmptrst and getsec. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.16.28.1 src/sys/arch/amd64/amd64/db_disasm.c cvs rdiff -u -r1.40 -r1.40.38.1 src/sys/arch/i386/i386/db_disasm.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/amd64/amd64/db_disasm.c diff -u src/sys/arch/amd64/amd64/db_disasm.c:1.16 src/sys/arch/amd64/amd64/db_disasm.c:1.16.28.1 --- src/sys/arch/amd64/amd64/db_disasm.c:1.16 Sun Jul 17 20:54:36 2011 +++ src/sys/arch/amd64/amd64/db_disasm.c Fri Dec 12 19:07:46 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: db_disasm.c,v 1.16 2011/07/17 20:54:36 joerg Exp $ */ +/* $NetBSD: db_disasm.c,v 1.16.28.1 2014/12/12 19:07:46 martin Exp $ */ /* * Mach Operating System @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.16 2011/07/17 20:54:36 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.16.28.1 2014/12/12 19:07:46 martin Exp $"); #ifndef _KERNEL #include @@ -108,11 +108,11 @@ __KERNEL_RCSID(0, "$NetBSD: db_disasm.c, #define Iq 36 /* word immediate, maybe 64bits */ struct inst { - const char *i_name; /* name */ + const char *i_name; /* name */ short i_has_modrm; /* has regmodrm byte */ short i_size; /* operand size */ int i_mode; /* addressing modes */ - const char *i_extra; /* pointer to extra opcode table */ + const void *i_extra; /* pointer to extra opcode table */ }; #define op1(x) (x) @@ -123,7 +123,7 @@ struct finst { const char *f_name; /* name for memory instruction */ int f_size; /* size for memory instruction */ int f_rrmode; /* mode for rr instruction */ - const char *f_rrname; /* name for rr instruction + const void *f_rrname; /* name for rr instruction (or pointer to table) */ }; @@ -167,13 +167,13 @@ const char * const db_Grp9[] = { "", "", "", - "", - "", + "vmptrld", + "vmptrst" }; const struct inst db_inst_0f0x[] = { -/*00*/ { "", true, NONE, op1(Ew), (const char *)db_Grp6 }, -/*01*/ { "", true, NONE, op1(Ew), (const char *)db_Grp7 }, +/*00*/ { "", true, NONE, op1(Ew), db_Grp6 }, +/*01*/ { "", true, NONE, op1(Ew), db_Grp7 }, /*02*/ { "lar", true, LONG, op2(E,R),0 }, /*03*/ { "lsl", true, LONG, op2(E,R),0 }, /*04*/ { "", false, NONE, 0, 0 }, @@ -191,7 +191,7 @@ const struct inst db_inst_0f0x[] = { /*0f*/ { "", false, NONE, 0, 0 }, /* 3DNow */ }; -const struct inst db_inst_0f2x[] = { +const struct inst db_inst_0f2x[] = { /*20*/ { "mov", true, LONG, op2(CR,E), 0 }, /* use E for reg */ /*21*/ { "mov", true, LONG, op2(DR,E), 0 }, /* since mod == 11 */ /*22*/ { "mov", true, LONG, op2(E,CR), 0 }, @@ -211,7 +211,7 @@ const struct inst db_inst_0f2x[] = { /*2f*/ { "", false, NONE, 0, 0 }, }; -const struct inst db_inst_0f3x[] = { +const struct inst db_inst_0f3x[] = { /*30*/ { "wrmsr", false, NONE, 0, 0 }, /*31*/ { "rdtsc", false, NONE, 0, 0 }, /*32*/ { "rdmsr", false, NONE, 0, 0 }, @@ -219,19 +219,19 @@ const struct inst db_inst_0f3x[] = { /*34*/ { "sysenter",false,NONE, 0, 0 }, /*35*/ { "sysexit",false, NONE, 0, 0 }, /*36*/ { "", false, NONE, 0, 0 }, -/*37*/ { "", false, NONE, 0, 0 }, +/*37*/ { "getsec",false, NONE, 0, 0 }, /*38*/ { "", false, NONE, 0, 0 }, /*39*/ { "", false, NONE, 0, 0 }, /*3a*/ { "", false, NONE, 0, 0 }, -/*3v*/ { "", false, NONE, 0, 0 }, +/*3b*/ { "", false, NONE, 0, 0 }, /*3c*/ { "", false, NONE, 0, 0 }, /*3d*/ { "", false, NONE, 0, 0 }, /*3e*/ { "", false, NONE, 0, 0 }, /*3f*/ { "", false, NONE, 0, 0 }, }; -const struct inst db_inst_0f4x[] = { +const struct inst db_inst_0f4x[] = { /*40*/ { "cmovo", true, LONG, op2(E,R),0 }, /*41*/ { "cmovno", true, LONG, op2(E,R),0 }, /*42*/ {
CVS commit: [netbsd-7] src/sys/compat/netbsd32
Module Name:src Committed By: martin Date: Fri Dec 12 19:12:08 UTC 2014 Modified Files: src/sys/compat/netbsd32 [netbsd-7]: netbsd32_compat_30.c Log Message: Pull up following revision(s) (requested by maxv in ticket #314): sys/compat/netbsd32/netbsd32_compat_30.c: revision 1.31 User-triggerable kmem_alloc(0). Ok martin@ christos@ User To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.30.34.1 src/sys/compat/netbsd32/netbsd32_compat_30.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/compat/netbsd32/netbsd32_compat_30.c diff -u src/sys/compat/netbsd32/netbsd32_compat_30.c:1.30 src/sys/compat/netbsd32/netbsd32_compat_30.c:1.30.34.1 --- src/sys/compat/netbsd32/netbsd32_compat_30.c:1.30 Fri Apr 23 15:19:20 2010 +++ src/sys/compat/netbsd32/netbsd32_compat_30.c Fri Dec 12 19:12:08 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_compat_30.c,v 1.30 2010/04/23 15:19:20 rmind Exp $ */ +/* $NetBSD: netbsd32_compat_30.c,v 1.30.34.1 2014/12/12 19:12:08 martin Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_30.c,v 1.30 2010/04/23 15:19:20 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_30.c,v 1.30.34.1 2014/12/12 19:12:08 martin Exp $"); #include #include @@ -78,6 +78,9 @@ compat_30_netbsd32_getdents(struct lwp * error = EBADF; goto out; } + if (count == 0) + goto out; + buf = kmem_alloc(count, KM_SLEEP); error = vn_readdir(fp, buf, UIO_SYSSPACE, count, &done, l, 0, 0); if (error == 0) {
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Fri Dec 12 19:13:32 UTC 2014 Modified Files: src/doc [netbsd-7]: CHANGES-7.0 Log Message: Tickets #309 - #314 To generate a diff of this commit: cvs rdiff -u -r1.1.2.127 -r1.1.2.128 src/doc/CHANGES-7.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.0 diff -u src/doc/CHANGES-7.0:1.1.2.127 src/doc/CHANGES-7.0:1.1.2.128 --- src/doc/CHANGES-7.0:1.1.2.127 Thu Dec 11 13:38:01 2014 +++ src/doc/CHANGES-7.0 Fri Dec 12 19:13:32 2014 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.0,v 1.1.2.127 2014/12/11 13:38:01 martin Exp $ +# $NetBSD: CHANGES-7.0,v 1.1.2.128 2014/12/12 19:13:32 martin Exp $ A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014 until the 7.0 release: @@ -3407,3 +3407,77 @@ tests/lib/librumpclient/h_execthr.c 1.3 4 fds) [gson, ticket #307] +distrib/sets/lists/man/mi 1.1491 +share/man/man7/Makefile1.31 + + Add missing src(7) reported by Patrick Welche. + [msaitoh, ticket #309] + +sys/arch/x86/include/cacheinfo.h 1.19 +sys/arch/x86/include/specialreg.h 1.79-1.80 +usr.sbin/cpuctl/arch/i386.c 1.59 + + Update some cpuid related values: + - Add XSAVECC, XGETBV, XSAVES, SMAP and PQE + - Change XINUSE to XGETBV + - Add new cache descripter value (0xc3) + - Update signatures for the follwing CPUs: + - Core M-5xxx + - Core i7 Extreme + - Future Core (0x4e) + - Future Xeon (0x56) + [msaitoh, ticket #310] + +sys/dev/pci/pcireg.h1.96 +sys/dev/pci/ppb.c1.53-1.54 + + - Modify message of PCIe capability version. This field + (PCIE_XCAP_VER_MASK) is not specification's version + number but the capability structure's version number. + To avoid confusion, print "PCI Express capability version x". + - The max number of PCIe lane is not 16 but 32. Fix the bug + using with macro. + - Use macro instead of magic number. + - Gb/s -> GT/s + + Rename PCIE_XCAP_VER_* macros to avoid confusion. + [msaitoh, ticket #311] + +sys/dev/pci/pci_subr.c1.127-1.132 +sys/dev/pci/pcireg.h1.97-1.99 + + Always print the "Slot implemented" bit in the PCIe Capabilities + Register using onoff(). + + - Add some PCI subclass and interfaces. + - The interface of PCI_SUBCLASS_BRIDGE_RACEWAY is not decoded yet. + - Fix typo in a message. + - Add/Modify some comments. + + Fix a bug that the specification revision of the Power Management + function was incorrectly printed in the output of capability "list". + + - Cleanup pci_conf_print_caplist. Use table. The reason why it loops + twice is that some capabilities appear multiple times (e.g. + HyperTransport cap). + - Print the specification revision of Power Management and AGP not in + the capability list part but in the detail part. + + Add some HyperTransport related defines required for MSI. + [msaitoh, ticket #312] + +sys/arch/amd64/amd64/db_disasm.c 1.17-1.20 +sys/arch/i386/i386/db_disasm.c 1.41-1.44 + + Stylistic and comment improvements, fix two bugs: + - aaa and daa were reversed. Same as *BSDs. + - fix operand order of shld and shrd. Same as *BSDs. + + Add support for sysenter, sysexit, vmptrld, vmptrst and getsec. + [msaitoh, ticket #313] + +sys/compat/netbsd32/netbsd32_compat_30.c 1.31 + + Avoid a user-triggerable kmem_alloc(0). + [maxv, ticket #314] +
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Fri Dec 12 19:36:22 UTC 2014 Modified Files: src/share/misc: acronyms.comp Log Message: Add one from the security realm. To generate a diff of this commit: cvs rdiff -u -r1.143 -r1.144 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.143 src/share/misc/acronyms.comp:1.144 --- src/share/misc/acronyms.comp:1.143 Wed Aug 20 16:05:03 2014 +++ src/share/misc/acronyms.comp Fri Dec 12 19:36:22 2014 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.143 2014/08/20 16:05:03 ginsbach Exp $ +$NetBSD: acronyms.comp,v 1.144 2014/12/12 19:36:22 ginsbach Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -53,6 +53,7 @@ AP application processor API application programming interface APIC advanced programmable interrupt controller APIPA automatic private IP addressing +APT advanced persistant threat AQM active queue management ARAT always running APIC timer ARC adaptive replacement cache
CVS commit: src/external/gpl3/gdb/dist/gdb
Module Name:src Committed By: martin Date: Fri Dec 12 20:25:35 UTC 2014 Modified Files: src/external/gpl3/gdb/dist/gdb: armnbsd-tdep.c Log Message: Fix byte order selection for breakpoints: on arm the byte order for code might differ from the generic BFD endianess. Fixes PR toolchain/49445. To generate a diff of this commit: cvs rdiff -u -r1.1.1.3 -r1.2 src/external/gpl3/gdb/dist/gdb/armnbsd-tdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gdb/dist/gdb/armnbsd-tdep.c diff -u src/external/gpl3/gdb/dist/gdb/armnbsd-tdep.c:1.1.1.3 src/external/gpl3/gdb/dist/gdb/armnbsd-tdep.c:1.2 --- src/external/gpl3/gdb/dist/gdb/armnbsd-tdep.c:1.1.1.3 Sun Jun 22 23:40:55 2014 +++ src/external/gpl3/gdb/dist/gdb/armnbsd-tdep.c Fri Dec 12 20:25:35 2014 @@ -43,7 +43,7 @@ arm_netbsd_init_abi_common (struct gdbar struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); tdep->lowest_pc = 0x8000; - switch (info.byte_order) + switch (info.byte_order_for_code) { case BFD_ENDIAN_LITTLE: tdep->arm_breakpoint = arm_nbsd_arm_le_breakpoint;
CVS commit: src/share/misc
Module Name:src Committed By: riz Date: Fri Dec 12 23:48:45 UTC 2014 Modified Files: src/share/misc: acronyms.comp Log Message: Spell 'persistent' correctly. To generate a diff of this commit: cvs rdiff -u -r1.144 -r1.145 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.144 src/share/misc/acronyms.comp:1.145 --- src/share/misc/acronyms.comp:1.144 Fri Dec 12 19:36:22 2014 +++ src/share/misc/acronyms.comp Fri Dec 12 23:48:45 2014 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.144 2014/12/12 19:36:22 ginsbach Exp $ +$NetBSD: acronyms.comp,v 1.145 2014/12/12 23:48:45 riz Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -53,7 +53,7 @@ AP application processor API application programming interface APIC advanced programmable interrupt controller APIPA automatic private IP addressing -APT advanced persistant threat +APT advanced persistent threat AQM active queue management ARAT always running APIC timer ARC adaptive replacement cache
CVS commit: src/etc
Module Name:src Committed By: uebayasi Date: Sat Dec 13 02:17:35 UTC 2014 Modified Files: src/etc: security Log Message: Indent and space fixes. To generate a diff of this commit: cvs rdiff -u -r1.117 -r1.118 src/etc/security Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/security diff -u src/etc/security:1.117 src/etc/security:1.118 --- src/etc/security:1.117 Sun Nov 23 16:36:03 2014 +++ src/etc/security Sat Dec 13 02:17:35 2014 @@ -1,6 +1,6 @@ #!/bin/sh - # -# $NetBSD: security,v 1.117 2014/11/23 16:36:03 christos Exp $ +# $NetBSD: security,v 1.118 2014/12/13 02:17:35 uebayasi Exp $ # from: @(#)security 8.1 (Berkeley) 6/9/93 # @@ -67,9 +67,9 @@ CHANGEFILES=changefiles.$$ SPECIALSPEC=specialspec.$$ if [ -n "${pkgdb_dir}" ]; then -echo "WARNING: Setting pkgdb_dir in security.conf(5) is deprecated" -echo "WARNING: Please define PKG_DBDIR in pkg_install.conf(5) instead" -_compat_K_flag="-K ${pkgdb_dir}" + echo "WARNING: Setting pkgdb_dir in security.conf(5) is deprecated" + echo "WARNING: Please define PKG_DBDIR in pkg_install.conf(5) instead" + _compat_K_flag="-K ${pkgdb_dir}" fi have_pkgs() { @@ -117,7 +117,7 @@ migrate_file() # backup_and_diff file printdiff # Determine if file needs backing up, and if so, do it. -# If printdiff is yes, display the diffs, otherwise +# If printdiff is yes, display the diffs, otherwise # just print a message saying "[changes omitted]". # backup_and_diff() @@ -194,8 +194,8 @@ done | mtree -CM -k all > $SPECIALSPEC | # Check the master password file syntax. # if checkyesno check_passwd; then -# XXX: the sense of permit_star is reversed; the code works as -# implemented, but usage needs to be negated. + # XXX: the sense of permit_star is reversed; the code works as + # implemented, but usage needs to be negated. checkyesno check_passwd_permit_star && permit_star=0 || permit_star=1 checkyesno check_passwd_permit_nonalpha \ && permit_nonalpha=1 || permit_nonalpha=0 @@ -531,7 +531,7 @@ if checkyesno check_homes; then fi done < $MPBYPATH | awk -v "usergroups=$permit_usergroups" \ --v "permit_owners_list=$check_homes_permit_other_owner" ' + -v "permit_owners_list=$check_homes_permit_other_owner" ' BEGIN { split(permit_owners_list, a); for (i in a) permit_owners[a[i]]++; @@ -559,7 +559,7 @@ if checkyesno check_homes; then done done < $MPBYPATH | awk -v "usergroups=$permit_usergroups" \ --v "permit_owners_list=$check_homes_permit_other_owner" ' + -v "permit_owners_list=$check_homes_permit_other_owner" ' BEGIN { split(permit_owners_list, a); for (i in a) permit_owners[a[i]]++; @@ -593,7 +593,7 @@ if checkyesno check_homes; then done done < $MPBYPATH | awk -v "usergroups=$permit_usergroups" \ --v "permit_owners_list=$check_homes_permit_other_owner" ' + -v "permit_owners_list=$check_homes_permit_other_owner" ' BEGIN { split(permit_owners_list, a); for (i in a) permit_owners[a[i]]++; @@ -915,7 +915,7 @@ if checkyesno check_disklabels; then # nfs and "device" (the header of iostat) for i in $disks; do case $i in - [cfm]d[0-9]*|dk[0-9]*|st[0-9]*|nfs|device) + [cfm]d[0-9]*|dk[0-9]*|st[0-9]*|nfs|device) ;; *) if disklabel $i > /dev/null 1>&2; then @@ -960,17 +960,16 @@ if checkyesno check_disklabels; then fi if checkyesno check_lvm; then - -# generate list of existing LVM elements Physical Volumes, Volume Groups -# and Logical Volumes. -if [ -x /sbin/lvm ]; then -lvm pvdisplay -m >"$work_dir/lvm.pv" 2>/dev/null -lvm vgdisplay -m >"$work_dir/lvm.vg" 2>/dev/null -lvm lvdisplay -m >"$work_dir/lvm.lv" 2>/dev/null -fi -ls -1d $work_dir/lvm.* 2>/dev/null | -egrep -v '\.(backup|current)(,v)?$'>> $LVM_LABELS -CHANGELIST="$CHANGELIST $LVM_LABELS" + # generate list of existing LVM elements Physical Volumes, + # Volume Groups and Logical Volumes. + if [ -x /sbin/lvm ]; then + lvm pvdisplay -m >"$work_dir/lvm.pv" 2>/dev/null + lvm vgdisplay -m >"$work_dir/lvm.vg" 2>/dev/null + lvm lvdisplay -m >"$work_dir/lvm.lv" 2>/dev/null + fi + ls -1d $work_dir/lvm.* 2>/dev/null | + egrep -v '\.(backup|current)(,v)?$'>> $LVM_LABELS + CHANGELIST="$CHANGELIST $LVM_LABELS" fi # Check for changes in the list of installed pkgs @@ -1023,7 +1022,7 @@ if checkyesno check_changelist ; then # ls -1d $(echo $backup_dir/${file}.current) 2>/dev/null \ | sed "s,^$backup_dir/,, ; s,\.current$,," - + # ... expand possible files # ls -1d $(echo $file) 2>/dev/null
CVS commit: src/usr.sbin/postinstall
Module Name:src Committed By: uebayasi Date: Sat Dec 13 02:30:39 UTC 2014 Modified Files: src/usr.sbin/postinstall: postinstall Log Message: postinstall(8): Define long item lists as variables to improve future diff-ability. To generate a diff of this commit: cvs rdiff -u -r1.184 -r1.185 src/usr.sbin/postinstall/postinstall Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/postinstall/postinstall diff -u src/usr.sbin/postinstall/postinstall:1.184 src/usr.sbin/postinstall/postinstall:1.185 --- src/usr.sbin/postinstall/postinstall:1.184 Mon Dec 1 02:08:34 2014 +++ src/usr.sbin/postinstall/postinstall Sat Dec 13 02:30:39 2014 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: postinstall,v 1.184 2014/12/01 02:08:34 uebayasi Exp $ +# $NetBSD: postinstall,v 1.185 2014/12/13 02:30:39 uebayasi Exp $ # # Copyright (c) 2002-2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -1305,6 +1305,174 @@ do_pwd_mkdb() # # rc # + +# XXX Generate these from ../../distrib/sets/lists +rc_644_files=" +rc +rc.subr +rc.shutdown +" +rc_555_files=" +DAEMON +DISKS +LOGIN +NETWORKING +SERVERS +accounting +altqd +amd +apmd +bluetooth +bootconf.sh +bootparams +ccd +cgd +cleartmp +cron +devpubd +dhclient +dhcpcd +dhcpd +dhcrelay +dmesg +downinterfaces +envsys +fsck +fsck_root +ftp_proxy +ftpd +gpio +hostapd +httpd +identd +ifwatchd +inetd +ipfilter +ipfs +ipmon +ipnat +ipsec +irdaattach +iscsi_target +isdnd +isibootd +kdc +ldconfig +ldpd +local +lpd +lvm +makemandb +mdnsd +mixerctl +mopd +motd +mountall +mountcritlocal +mountcritremote +mountd +moused +mrouted +named +ndbootd +network +newsyslog +nfsd +nfslocking +npf +ntpd +ntpdate +perusertmp +pf +pf_boot +pflogd +postfix +powerd +ppp +pwcheck +quota +racoon +raidframe +raidframeparity +random_seed +rarpd +rbootd +rndctl +root +route6d +routed +rpcbind +rtadvd +rtclocaltime +rwho +savecore +screenblank +securelevel +sshd +staticroute +swap1 +swap2 +sysctl +sysdb +syslogd +timed +tpctl +ttys +veriexec +virecover +wdogctl +wpa_supplicant +wscons +wsmoused +ypbind +yppasswdd +ypserv +" +rc_obsolete_files=" +NETWORK +btattach +btconfig +btcontrol +btdevctl +bthcid +btuartd +daemon +fsck.sh +gated +kerberos +login +nfsiod +poffd +portmap +sdpd +servers +sunndd +systemfs +xntpd +" +rc_obsolete_vars=" +amd +amd_master +btcontrol +btcontrol_devices +critical_filesystems +critical_filesystems_beforenet +defcorename +ip6forwarding +mountcritlocal +mountcritremote +network +network +nfsiod_flags +sdpd +sdpd +sdpd +sdpd_control +sdpd_groupname +sdpd_username +sysctl +" + additem rc "/etc/rc* and /etc/rc.d/ being up to date" do_rc() { @@ -1317,7 +1485,7 @@ do_rc() fi compare_dir "${op}" "${SRC_DIR}/etc" "${DEST_DIR}/etc" 644 \ - rc rc.subr rc.shutdown + ${rc_644_files} failed=$(( ${failed} + $? )) if ! $SOURCEMODE; then @@ -1327,32 +1495,7 @@ do_rc() fi compare_dir "${op}" "${SRC_DIR}/etc/rc.d" "${DEST_DIR}/etc/rc.d" 555 \ - DAEMON DISKS LOGIN NETWORKING SERVERS \ - accounting altqd amd apmd \ - bluetooth bootconf.sh bootparams \ - ccd cgd cleartmp cron devpubd \ - dhclient dhcpcd dhcpd dhcrelay dmesg downinterfaces envsys \ - fsck fsck_root ftp_proxy ftpd \ - gpio \ - hostapd httpd \ - identd ifwatchd inetd ipfilter ipfs ipmon ipnat ipsec \ - irdaattach iscsi_target isdnd isibootd \ - kdc \ - ldconfig ldpd local lpd lvm \ - makemandb mdnsd mixerctl mopd motd mountall mountcritlocal \ - mountcritremote mountd moused mrouted \ - named ndbootd network newsyslog nfsd nfslocking npf ntpd \ - ntpdate \ - perusertmp pf pf_boot pflogd postfix powerd ppp pwcheck \ - quota \ - racoon rpcbind raidframe raidframeparity random_seed rarpd \ - rbootd rndctl root route6d routed rtadvd rtclocaltime \ - rwho \ - savecore screenblank securelevel sshd \ - staticroute swap1 swap2 sysctl sysdb syslogd \ - timed tpctl ttys \ - veriexec virecover wdogctl wpa_supplicant wscons wsmoused \ - ypbind yppasswdd ypserv \ + ${rc_555_files} \ ${extra_scripts} failed=$(( ${failed} + $? )) @@ -1371,25 +1514,14 @@ do_rc() fi # check for obsolete rc.d files - for f in NETWORK btattach btconfig btcontrol btdevctl bthcid btuartd \ - fsck.sh kerberos nfsiod sdpd servers \ - systemfs daemon gated login poffd portmap sunndd xntpd; do + for f in ${rc_obsolete_files}; do fd="/etc/rc.d/${f}" [ -e "${DEST_DIR}${fd}" ] && echo "${fd}" done | obsolete_paths "${op}" failed=$(( ${failed} + $? )) # check for obsolete rc.conf(5) variables - set -- amd amd_master \ - btcontrol btcontrol_devices \ - critical_filesystems critical_filesystems_beforenet \ - mountcritlocal mountcritremote \ - network ip6forwarding \ - network nfsiod_flags \ - sdpd sdpd_control \ - sdpd sdpd_groupname \ - sdpd sdpd_username \ - sysctl defcorename + set -- ${rc_obsolete_vars} while [ $# -gt 1 ]; do if rcconf_is_set "${op}" "$1" "$2" 1; then
CVS commit: src/usr.sbin/postinstall
Module Name:src Committed By: uebayasi Date: Sat Dec 13 02:35:02 UTC 2014 Modified Files: src/usr.sbin/postinstall: postinstall Log Message: Fix previous; obsolete vars are pairs. To generate a diff of this commit: cvs rdiff -u -r1.185 -r1.186 src/usr.sbin/postinstall/postinstall Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/postinstall/postinstall diff -u src/usr.sbin/postinstall/postinstall:1.185 src/usr.sbin/postinstall/postinstall:1.186 --- src/usr.sbin/postinstall/postinstall:1.185 Sat Dec 13 02:30:39 2014 +++ src/usr.sbin/postinstall/postinstall Sat Dec 13 02:35:02 2014 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: postinstall,v 1.185 2014/12/13 02:30:39 uebayasi Exp $ +# $NetBSD: postinstall,v 1.186 2014/12/13 02:35:02 uebayasi Exp $ # # Copyright (c) 2002-2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -1457,20 +1457,20 @@ btcontrol btcontrol_devices critical_filesystems critical_filesystems_beforenet -defcorename -ip6forwarding mountcritlocal mountcritremote network +ip6forwarding network nfsiod_flags sdpd -sdpd -sdpd sdpd_control +sdpd sdpd_groupname +sdpd sdpd_username sysctl +defcorename " additem rc "/etc/rc* and /etc/rc.d/ being up to date"
CVS commit: src/etc
Module Name:src Committed By: uebayasi Date: Sat Dec 13 02:53:08 UTC 2014 Modified Files: src/etc: daily Log Message: Indent. To generate a diff of this commit: cvs rdiff -u -r1.91 -r1.92 src/etc/daily Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/daily diff -u src/etc/daily:1.91 src/etc/daily:1.92 --- src/etc/daily:1.91 Tue Jul 22 17:11:09 2014 +++ src/etc/daily Sat Dec 13 02:53:08 2014 @@ -1,6 +1,6 @@ #!/bin/sh - # -# $NetBSD: daily,v 1.91 2014/07/22 17:11:09 wiz Exp $ +# $NetBSD: daily,v 1.92 2014/12/13 02:53:08 uebayasi Exp $ # @(#)daily 8.2 (Berkeley) 1/25/94 # @@ -37,9 +37,9 @@ if [ -z "$MAILTO" -o "$USER" != "root" ] fi if [ -n "${pkgdb_dir}" ]; then -echo "WARNING: Setting pkgdb_dir in daily.conf(5) is deprecated" -echo "WARNING: Please define PKG_DBDIR in pkg_install.conf(5) instead" -_compat_K_flag="-K ${pkgdb_dir}" + echo "WARNING: Setting pkgdb_dir in daily.conf(5) is deprecated" + echo "WARNING: Please define PKG_DBDIR in pkg_install.conf(5) instead" + _compat_K_flag="-K ${pkgdb_dir}" fi echo ""