CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: skrll Date: Tue Jul 17 06:12:11 UTC 2012 Modified Files: src/sys/arch/arm/include: armreg.h Log Message: Fix spelling mistake in comments. To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/sys/arch/arm/include/armreg.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/arch/arm/include/armreg.h diff -u src/sys/arch/arm/include/armreg.h:1.54 src/sys/arch/arm/include/armreg.h:1.55 --- src/sys/arch/arm/include/armreg.h:1.54 Tue Jul 17 06:04:23 2012 +++ src/sys/arch/arm/include/armreg.h Tue Jul 17 06:12:11 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: armreg.h,v 1.54 2012/07/17 06:04:23 skrll Exp $ */ +/* $NetBSD: armreg.h,v 1.55 2012/07/17 06:12:11 skrll Exp $ */ /* * Copyright (c) 1998, 2001 Ben Harris @@ -317,7 +317,7 @@ #define CPU_CONTROL_IDC_ENABLE CPU_CONTROL_DC_ENABLE -/* ARM11r0 Auxillary Control Register (CP15 register 1, opcode2 1) */ +/* ARM11r0 Auxiliary Control Register (CP15 register 1, opcode2 1) */ #define ARM11R0_AUXCTL_PFI 0x8000 /* PFI: partial FI mode. */ /* This is an undocumented flag * used to work around a cache bug @@ -340,7 +340,7 @@ #define ARM1176_AUXCTL_FSD 0x4000 /* force speculative ops disable */ #define ARM1176_AUXCTL_FIO 0x8000 /* low intr latency override */ -/* XScale Auxillary Control Register (CP15 register 1, opcode2 1) */ +/* XScale Auxiliary Control Register (CP15 register 1, opcode2 1) */ #define XSCALE_AUXCTL_K 0x0001 /* dis. write buffer coalescing */ #define XSCALE_AUXCTL_P 0x0002 /* ECC protect page table access */ #define XSCALE_AUXCTL_MD_WB_RA 0x /* mini-D$ wb, read-allocate */ @@ -348,7 +348,7 @@ #define XSCALE_AUXCTL_MD_WT 0x0020 /* mini-D$ wt, read-allocate */ #define XSCALE_AUXCTL_MD_MASK 0x0030 -/* ARM11 MPCore Auxillary Control Register (CP15 register 1, opcode2 1) */ +/* ARM11 MPCore Auxiliary Control Register (CP15 register 1, opcode2 1) */ #define MPCORE_AUXCTL_RS 0x0001 /* return stack */ #define MPCORE_AUXCTL_DB 0x0002 /* dynamic branch prediction */ #define MPCORE_AUXCTL_SB 0x0004 /* static branch prediction */
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: skrll Date: Tue Jul 17 06:04:23 UTC 2012 Modified Files: src/sys/arch/arm/include: armreg.h Log Message: Add the documented ARM11[37]6 Auxiliary control register defines. To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/sys/arch/arm/include/armreg.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/arch/arm/include/armreg.h diff -u src/sys/arch/arm/include/armreg.h:1.53 src/sys/arch/arm/include/armreg.h:1.54 --- src/sys/arch/arm/include/armreg.h:1.53 Sat Jul 14 07:54:29 2012 +++ src/sys/arch/arm/include/armreg.h Tue Jul 17 06:04:23 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: armreg.h,v 1.53 2012/07/14 07:54:29 matt Exp $ */ +/* $NetBSD: armreg.h,v 1.54 2012/07/17 06:04:23 skrll Exp $ */ /* * Copyright (c) 1998, 2001 Ben Harris @@ -324,6 +324,21 @@ * in r0 steppings. See errata * 364296. */ +/* ARM11x6 Auxiliary Control Register (CP15 register 1, opcode2 1) */ +#define ARM11X6_AUXCTL_RS 0x0001 /* return stack */ +#define ARM11X6_AUXCTL_DB 0x0002 /* dynamic branch prediction */ +#define ARM11X6_AUXCTL_SB 0x0004 /* static branch prediction */ +#define ARM11X6_AUXCTL_TR 0x0008 /* MicroTLB replacement strat. */ +#define ARM11X6_AUXCTL_EX 0x0010 /* exclusive L1/L2 cache */ +#define ARM11X6_AUXCTL_RA 0x0020 /* clean entire cache disable */ +#define ARM11X6_AUXCTL_RV 0x0040 /* block transfer cache disable */ +#define ARM11X6_AUXCTL_CZ 0x0080 /* restrict cache size */ + +/* ARM1176 Auxiliary Control Register (CP15 register 1, opcode2 1) */ +#define ARM1176_AUXCTL_PHD 0x1000 /* inst. prefetch halting disable */ +#define ARM1176_AUXCTL_BFD 0x2000 /* branch folding disable */ +#define ARM1176_AUXCTL_FSD 0x4000 /* force speculative ops disable */ +#define ARM1176_AUXCTL_FIO 0x8000 /* low intr latency override */ /* XScale Auxillary Control Register (CP15 register 1, opcode2 1) */ #define XSCALE_AUXCTL_K 0x0001 /* dis. write buffer coalescing */
CVS commit: src/sys/dev/sdmmc
Module Name:src Committed By: skrll Date: Tue Jul 17 05:57:49 UTC 2012 Modified Files: src/sys/dev/sdmmc: sdhc.c Log Message: Handle interrupt acknowledgement in the SDHC_FLAG_32BIT_ACCESS case in the same way as non-SDHC_FLAG_32BIT_ACCESS case. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/dev/sdmmc/sdhc.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/sdmmc/sdhc.c diff -u src/sys/dev/sdmmc/sdhc.c:1.20 src/sys/dev/sdmmc/sdhc.c:1.21 --- src/sys/dev/sdmmc/sdhc.c:1.20 Thu Jul 12 23:07:06 2012 +++ src/sys/dev/sdmmc/sdhc.c Tue Jul 17 05:57:49 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: sdhc.c,v 1.20 2012/07/12 23:07:06 jakllsch Exp $ */ +/* $NetBSD: sdhc.c,v 1.21 2012/07/17 05:57:49 skrll Exp $ */ /* $OpenBSD: sdhc.c,v 1.25 2009/01/13 19:44:20 grange Exp $ */ /* @@ -23,7 +23,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.20 2012/07/12 23:07:06 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.21 2012/07/17 05:57:49 skrll Exp $"); #ifdef _KERNEL_OPT #include "opt_sdmmc.h" @@ -1530,10 +1530,10 @@ sdhc_intr(void *arg) uint32_t xstatus = HREAD4(hp, SDHC_NINTR_STATUS); status = xstatus; error = xstatus >> 16; - status |= (error ? SDHC_ERROR_INTERRUPT : 0); if (!ISSET(status, SDHC_NINTR_STATUS_MASK)) continue; /* no interrupt for us */ /* Acknowledge the interrupts we are about to handle. */ + xstatus |= (error ? SDHC_ERROR_INTERRUPT : 0); HWRITE4(hp, SDHC_NINTR_STATUS, xstatus); } else { /* Find out which interrupts are pending. */
CVS commit: src/sys/dev/sdmmc
Module Name:src Committed By: skrll Date: Tue Jul 17 05:47:07 UTC 2012 Modified Files: src/sys/dev/sdmmc: sdmmc.c Log Message: Whitespace. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/dev/sdmmc/sdmmc.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/sdmmc/sdmmc.c diff -u src/sys/dev/sdmmc/sdmmc.c:1.13 src/sys/dev/sdmmc/sdmmc.c:1.14 --- src/sys/dev/sdmmc/sdmmc.c:1.13 Thu Jul 12 16:01:53 2012 +++ src/sys/dev/sdmmc/sdmmc.c Tue Jul 17 05:47:07 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: sdmmc.c,v 1.13 2012/07/12 16:01:53 jakllsch Exp $ */ +/* $NetBSD: sdmmc.c,v 1.14 2012/07/17 05:47:07 skrll Exp $ */ /* $OpenBSD: sdmmc.c,v 1.18 2009/01/09 10:58:38 jsg Exp $ */ /* @@ -49,7 +49,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sdmmc.c,v 1.13 2012/07/12 16:01:53 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sdmmc.c,v 1.14 2012/07/17 05:47:07 skrll Exp $"); #ifdef _KERNEL_OPT #include "opt_sdmmc.h" @@ -516,7 +516,7 @@ sdmmc_enable(struct sdmmc_softc *sc) goto out; } - /* Initialize SD/MMC memory card(s). */ + /* Initialize SD/MMC memory card(s). */ if (ISSET(sc->sc_caps, SMC_CAPS_SPI_MODE) || ISSET(sc->sc_flags, SMF_MEM_MODE)) error = sdmmc_mem_enable(sc);
CVS commit: src/lib/libc
Module Name:src Committed By: dholland Date: Tue Jul 17 05:41:30 UTC 2012 Modified Files: src/lib/libc: shlib_version Log Message: Note that when the mythical libc bump comes, one of the things we should do is punt ruserok() and its related apparatus out to libcompat. (Or perhaps just remove it entirely.) To generate a diff of this commit: cvs rdiff -u -r1.233 -r1.234 src/lib/libc/shlib_version Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/shlib_version diff -u src/lib/libc/shlib_version:1.233 src/lib/libc/shlib_version:1.234 --- src/lib/libc/shlib_version:1.233 Sat Jul 14 15:06:26 2012 +++ src/lib/libc/shlib_version Tue Jul 17 05:41:30 2012 @@ -1,4 +1,4 @@ -# $NetBSD: shlib_version,v 1.233 2012/07/14 15:06:26 darrenr Exp $ +# $NetBSD: shlib_version,v 1.234 2012/07/17 05:41:30 dholland Exp $ # Remember to update distrib/sets/lists/base/shl.* when changing # # things we wish to do on next major version bump: @@ -30,5 +30,6 @@ # see isblank's comment in ctype.h. # - remove gets(); it is finally dead in c11. # - make __cerror (spelled CERROR) hidden again +# - remove ruserok() and friends to libcompat (or entirely) major=12 minor=185
CVS commit: src/sys/arch/powerpc/oea
Module Name:src Committed By: jmmv Date: Tue Jul 17 03:13:31 UTC 2012 Modified Files: src/sys/arch/powerpc/oea: ofwoea_machdep.c Log Message: OF_finddevice returns -1 on error, not an arbitrary negative number. Make conditional explicit so that model_name gets a chance to be initialized when the handle for the device is actually negative (which appears to be the case in my Mac Mini G4). To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/arch/powerpc/oea/ofwoea_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/powerpc/oea/ofwoea_machdep.c diff -u src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.29 src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.30 --- src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.29 Tue May 8 05:15:45 2012 +++ src/sys/arch/powerpc/oea/ofwoea_machdep.c Tue Jul 17 03:13:31 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ofwoea_machdep.c,v 1.29 2012/05/08 05:15:45 macallan Exp $ */ +/* $NetBSD: ofwoea_machdep.c,v 1.30 2012/07/17 03:13:31 jmmv Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.29 2012/05/08 05:15:45 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.30 2012/07/17 03:13:31 jmmv Exp $"); #include "opt_ppcarch.h" #include "opt_compat_netbsd.h" @@ -159,7 +159,7 @@ ofwoea_initppc(u_int startkernel, u_int /* get model name and perform model-specific actions */ memset(model_name, 0, sizeof(model_name)); node = OF_finddevice("/"); - if (node >= 0) { + if (node != -1) { l = OF_getprop(node, "model", model_name, sizeof(model_name)); if (l == -1) OF_getprop(node, "name", model_name,
CVS commit: src/sys/arch
Module Name:src Committed By: matt Date: Tue Jul 17 01:36:14 UTC 2012 Modified Files: src/sys/arch/evbppc/conf: TWRP1025 src/sys/arch/evbppc/mpc85xx: machdep.c src/sys/arch/powerpc/booke/dev: pq3etsec.c src/sys/arch/powerpc/include/booke: e500reg.h etsecreg.h Log Message: The ETSEC on the P1025 has been moved/split so the MDIO stayed in the same place but each ETSEC has been split into two virtual halves (G0 and G1) and each one has a new different base address. For some reason, tsec1 connects to phy 2 and tsec2 connects to phy 1. Adjust config file to match To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbppc/conf/TWRP1025 cvs rdiff -u -r1.25 -r1.26 src/sys/arch/evbppc/mpc85xx/machdep.c cvs rdiff -u -r1.14 -r1.15 src/sys/arch/powerpc/booke/dev/pq3etsec.c cvs rdiff -u -r1.11 -r1.12 src/sys/arch/powerpc/include/booke/e500reg.h cvs rdiff -u -r1.4 -r1.5 src/sys/arch/powerpc/include/booke/etsecreg.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/arch/evbppc/conf/TWRP1025 diff -u src/sys/arch/evbppc/conf/TWRP1025:1.1 src/sys/arch/evbppc/conf/TWRP1025:1.2 --- src/sys/arch/evbppc/conf/TWRP1025:1.1 Sun Jul 15 08:44:56 2012 +++ src/sys/arch/evbppc/conf/TWRP1025 Tue Jul 17 01:36:12 2012 @@ -1,4 +1,4 @@ -# $NetBSD: TWRP1025,v 1.1 2012/07/15 08:44:56 matt Exp $ +# $NetBSD: TWRP1025,v 1.2 2012/07/17 01:36:12 matt Exp $ # # TWRP1025 -- everything that's currently supported # @@ -7,7 +7,7 @@ include "arch/evbppc/conf/std.mpc85xx" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -ident "TWRP1025-$Revision: 1.1 $" +ident "TWRP1025-$Revision: 1.2 $" maxusers 32 @@ -167,8 +167,8 @@ duart* at cpunode? com* at duart? port ? options CONSADDR="DUART1_BASE" -tsec0 at cpunode? flags 0x002 # Enhanced 3-Speed Ethernet Controller -tsec1 at cpunode? flags 0x103 # Enhanced 3-Speed Ethernet Controller +tsec0 at cpunode? instance 1 flags 0x003 # Enhanced 3-Speed Ethernet Controller +tsec1 at cpunode? instance 3 flags 0x102 # Enhanced 3-Speed Ethernet Controller ukphy* at mii? #options ETSEC_EVENT_COUNTERS Index: src/sys/arch/evbppc/mpc85xx/machdep.c diff -u src/sys/arch/evbppc/mpc85xx/machdep.c:1.25 src/sys/arch/evbppc/mpc85xx/machdep.c:1.26 --- src/sys/arch/evbppc/mpc85xx/machdep.c:1.25 Sun Jul 15 08:44:56 2012 +++ src/sys/arch/evbppc/mpc85xx/machdep.c Tue Jul 17 01:36:12 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.25 2012/07/15 08:44:56 matt Exp $ */ +/* $NetBSD: machdep.c,v 1.26 2012/07/17 01:36:12 matt Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -221,9 +221,23 @@ static const struct cpunode_locators mpc 1 + ilog2(DEVDISR_DUART) }, { "tsec", ETSEC1_BASE, ETSEC_SIZE, 1, 3, { ISOURCE_ETSEC1_TX, ISOURCE_ETSEC1_RX, ISOURCE_ETSEC1_ERR }, - 1 + ilog2(DEVDISR_TSEC1) }, + 1 + ilog2(DEVDISR_TSEC1), + { 0x, SVR_P1025v1 >> 16 } }, +#if defined(P1025) + { "tsec", ETSEC1_G0_BASE, ETSEC_SIZE, 1, + 3, { ISOURCE_ETSEC1_TX, ISOURCE_ETSEC1_RX, ISOURCE_ETSEC1_ERR }, + 1 + ilog2(DEVDISR_TSEC1), + { SVR_P1025v1 >> 16 } }, +#if 0 + { "tsec", ETSEC1_G1_BASE, ETSEC_SIZE, 1, + 3, { ISOURCE_ETSEC1_G1_TX, ISOURCE_ETSEC1_G1_RX, + ISOURCE_ETSEC1_G1_ERR }, + 1 + ilog2(DEVDISR_TSEC1), + { SVR_P1025v1 >> 16 } }, +#endif +#endif #if defined(MPC8548) || defined(MPC8555) || defined(MPC8572) \ -|| defined(P2020) || defined(P1025) +|| defined(P2020) { "tsec", ETSEC2_BASE, ETSEC_SIZE, 2, 3, { ISOURCE_ETSEC2_TX, ISOURCE_ETSEC2_RX, ISOURCE_ETSEC2_ERR }, 1 + ilog2(DEVDISR_TSEC2), @@ -231,18 +245,44 @@ static const struct cpunode_locators mpc SVR_MPC8572v1 >> 16, SVR_P2020v2 >> 16, SVR_P1025v1 >> 16 } }, #endif +#if defined(P1025) + { "tsec", ETSEC2_G0_BASE, ETSEC_SIZE, 2, + 3, { ISOURCE_ETSEC2_TX, ISOURCE_ETSEC2_RX, ISOURCE_ETSEC2_ERR }, + 1 + ilog2(DEVDISR_TSEC2), + { SVR_P1025v1 >> 16 } }, +#if 0 + { "tsec", ETSEC2_G1_BASE, ETSEC_SIZE, 5, + 3, { ISOURCE_ETSEC2_G1_TX, ISOURCE_ETSEC2_G1_RX, + ISOURCE_ETSEC2_G1_ERR }, + 1 + ilog2(DEVDISR_TSEC2), + { SVR_P1025v1 >> 16 } }, +#endif +#endif #if defined(MPC8544) || defined(MPC8536) { "tsec", ETSEC3_BASE, ETSEC_SIZE, 2, 3, { ISOURCE_ETSEC3_TX, ISOURCE_ETSEC3_RX, ISOURCE_ETSEC3_ERR }, 1 + ilog2(DEVDISR_TSEC3), { SVR_MPC8536v1 >> 16, SVR_MPC8544v1 >> 16 } }, #endif -#if defined(MPC8548) || defined(MPC8572) || defined(P1025) || defined(P2020) +#if defined(MPC8548) || defined(MPC8572) || defined(P2020) { "tsec", ETSEC3_BASE, ETSEC_SIZE, 3, 3, { ISOURCE_ETSEC3_TX, ISOURCE_ETSEC3_RX, ISOURCE_ETSEC3_ERR }, 1 + ilog2(DEVDISR_TSEC3), { SVR_MPC8548v1 >> 16, SVR_MPC8572v1 >> 16, - SVR_P2020v2 >> 16, SVR_P1025v1 >> 16 } }, + SVR_P2020v2 >> 16 } }, +#endif +#if defined(P1025) + { "tsec", ETSEC3_G0_BASE, ETSEC_SIZE, 3, + 3, { ISOURCE_ETSEC3_TX, ISOURCE_ETSEC3_RX, I
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: riz Date: Mon Jul 16 22:14:19 UTC 2012 Modified Files: src/doc [netbsd-6]: CHANGES-6.0 Log Message: Tickets 416, 418-421. To generate a diff of this commit: cvs rdiff -u -r1.1.2.155 -r1.1.2.156 src/doc/CHANGES-6.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-6.0 diff -u src/doc/CHANGES-6.0:1.1.2.155 src/doc/CHANGES-6.0:1.1.2.156 --- src/doc/CHANGES-6.0:1.1.2.155 Thu Jul 12 19:43:15 2012 +++ src/doc/CHANGES-6.0 Mon Jul 16 22:14:19 2012 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.0,v 1.1.2.155 2012/07/12 19:43:15 riz Exp $ +# $NetBSD: CHANGES-6.0,v 1.1.2.156 2012/07/16 22:14:19 riz Exp $ A complete list of changes from the initial NetBSD 6.0 branch on 15 Feb 2012 until the 6.0 release: @@ -6315,3 +6315,57 @@ xsrc/external/mit/xorg-server/dist/hw/xf Fix colors on suncg6. [macallan, ticket #415] +lib/libc/arch/arm/gen/Makefile.inc 1.17 + + Fix ARM static binaries. + [reinoud, ticket #416] + +sys/dev/ldvar.h 1.21 + + Fix problem with ataraid volumes larger than 2 TiB. + [nonaka, ticket #418] + +usr.sbin/postinstall/postinstall 1.136 via patch + + Properly find atf configuration files in the source tree. PR#45870. + [jmmv, ticket #419] + +common/lib/libc/gen/ptree.c 1.7-1.9 +sys/sys/ptree.h 1.7 + + ptree fixes: don't test 0 length keys, protect against multiple + insertions, and make key argument const. + [rmind, ticket #420] + +lib/libnpf/npf.c1.10 +lib/libnpf/npf.h1.9 +sys/net/npf/files.npf1.7 +sys/net/npf/npf.c1.12 +sys/net/npf/npf.h1.19 +sys/net/npf/npf_alg.c1.5 +sys/net/npf/npf_alg_icmp.c 1.10 +sys/net/npf/npf_ctl.c1.16 +sys/net/npf/npf_handler.c 1.20 +sys/net/npf/npf_impl.h1.18 +sys/net/npf/npf_inet.c1.14 +sys/net/npf/npf_instr.c1.13 +sys/net/npf/npf_nat.c1.15 +sys/net/npf/npf_ruleset.c 1.13 +sys/net/npf/npf_sendpkt.c 1.12 +sys/net/npf/npf_session.c 1.15 +sys/net/npf/npf_state_tcp.c 1.9 +sys/net/npf/npf_tableset.c 1.13 +sys/net/npf/npf_tableset_ptree.c 1.1 +sys/rump/dev/lib/libnpf/Makefile 1.4 +usr.sbin/npf/npfctl/npf_build.c 1.11 +usr.sbin/npf/npfctl/npf_data.c 1.15 +usr.sbin/npf/npfctl/npf_disassemble.c 1.7 +usr.sbin/npf/npfctl/npf_ncgen.c 1.12 +usr.sbin/npf/npfctl/npf_parse.y 1.10 +usr.sbin/npf/npfctl/npfctl.c 1.15 +usr.sbin/npf/npfctl/npfctl.h 1.17 +usr.sbin/npf/npftest/libnpftest/npf_table_test.c 1.4 + + Rework NPF tables and fix support for IPv6. + [rmind, ticket #421] +
CVS commit: [netbsd-6] src
Module Name:src Committed By: riz Date: Mon Jul 16 22:10:47 UTC 2012 Modified Files: src/common/lib/libc/gen [netbsd-6]: ptree.c src/sys/sys [netbsd-6]: ptree.h Log Message: Pull up following revision(s) (requested by rmind in ticket #420): common/lib/libc/gen/ptree.c: revision 1.7 common/lib/libc/gen/ptree.c: revision 1.8 common/lib/libc/gen/ptree.c: revision 1.9 sys/sys/ptree.h: revision 1.7 Don't bother testing 0 length keys since they can only have one possible value. Add code to protect the ptree from multiple insertions of the same node. ptree_find_filtered_node: make key argument const. To generate a diff of this commit: cvs rdiff -u -r1.5.8.1 -r1.5.8.2 src/common/lib/libc/gen/ptree.c cvs rdiff -u -r1.4.8.1 -r1.4.8.2 src/sys/sys/ptree.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/gen/ptree.c diff -u src/common/lib/libc/gen/ptree.c:1.5.8.1 src/common/lib/libc/gen/ptree.c:1.5.8.2 --- src/common/lib/libc/gen/ptree.c:1.5.8.1 Thu Jul 12 18:35:10 2012 +++ src/common/lib/libc/gen/ptree.c Mon Jul 16 22:10:46 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ptree.c,v 1.5.8.1 2012/07/12 18:35:10 riz Exp $ */ +/* $NetBSD: ptree.c,v 1.5.8.2 2012/07/16 22:10:46 riz Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -40,7 +40,7 @@ #include #include #include -__KERNEL_RCSID(0, "$NetBSD: ptree.c,v 1.5.8.1 2012/07/12 18:35:10 riz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ptree.c,v 1.5.8.2 2012/07/16 22:10:46 riz Exp $"); #else #include #include @@ -53,7 +53,7 @@ __KERNEL_RCSID(0, "$NetBSD: ptree.c,v 1. #else #define KASSERT(e) do { } while (/*CONSTCOND*/ 0) #endif -__RCSID("$NetBSD: ptree.c,v 1.5.8.1 2012/07/12 18:35:10 riz Exp $"); +__RCSID("$NetBSD: ptree.c,v 1.5.8.2 2012/07/16 22:10:46 riz Exp $"); #endif /* _KERNEL || _STANDALONE */ #ifdef _LIBC @@ -67,7 +67,7 @@ __RCSID("$NetBSD: ptree.c,v 1.5.8.1 2012 #endif /* - * This is an implementation of a radix / PATRICIA tree. As in a traditional + * This is an implementation of a radix / PATRICIA tree. As in a traditional * patricia tree, all the data is at the leaves of the tree. An N-value * tree would have N leaves, N-1 branching nodes, and a root pointer. Each * branching node would have left(0) and right(1) pointers that either point @@ -76,15 +76,15 @@ __RCSID("$NetBSD: ptree.c,v 1.5.8.1 2012 * have no need for pointers. * * However, allocation for these branching nodes is problematic since the - * allocation could fail. This would cause insertions to fail for reasons - * beyond the users control. So to prevent this, in this implementation + * allocation could fail. This would cause insertions to fail for reasons + * beyond the user's control. So to prevent this, in this implementation * each node has two identities: its leaf identity and its branch identity. * Each is separate from the other. Every branch is tagged as to whether * it points to a leaf or a branch. This is not an attribute of the object * but of the pointer to the object. The low bit of the pointer is used as * the tag to determine whether it points to a leaf or branch identity, with * branch identities having the low bit set. - * + * * A node's branch identity has one rule: when traversing the tree from the * root to the node's leaf identity, one of the branches traversed will be via * the node's branch identity. Of course, that has an exception: since to @@ -93,7 +93,7 @@ __RCSID("$NetBSD: ptree.c,v 1.5.8.1 2012 * * Branching nodes also has a bit offset and a bit length which determines * which branch slot is used. The bit length can be zero resulting in a - * one-way branch. This is happens in two special cases: the root and + * one-way branch. This happens in two special cases: the root and * interior mask nodes. * * To support longest match first lookups, when a mask node (one that only @@ -134,7 +134,7 @@ ptree_testnode(const pt_tree_t *pt, cons { const pt_bitlen_t bitlen = PTN_BRANCH_BITLEN(ptn); if (bitlen == 0) - return PT_SLOT_ROOT; + return PT_SLOT_ROOT; /* mask or root, doesn't matter */ return (*pt->pt_ops->ptto_testnode)(NODETOKEY(pt, target), PTN_BRANCH_BITOFF(ptn), bitlen, pt->pt_context); } @@ -150,6 +150,9 @@ ptree_matchkey(const pt_tree_t *pt, cons static inline pt_slot_t ptree_testkey(const pt_tree_t *pt, const void *key, const pt_node_t *ptn) { + const pt_bitlen_t bitlen = PTN_BRANCH_BITLEN(ptn); + if (bitlen == 0) + return PT_SLOT_ROOT; /* mask or root, doesn't matter */ return (*pt->pt_ops->ptto_testkey)(key, PTN_BRANCH_BITOFF(ptn), PTN_BRANCH_BITLEN(ptn), pt->pt_context); } @@ -456,6 +459,12 @@ ptree_insert_node_common(pt_tree_t *pt, pt_insertdata_t id; /* + * If this node already exists in the tree, return failure. + */ + if (target == PT_NODE(pt->pt_root)) + return false; +
CVS commit: [netbsd-6] src/usr.sbin/postinstall
Module Name:src Committed By: riz Date: Mon Jul 16 22:08:03 UTC 2012 Modified Files: src/usr.sbin/postinstall [netbsd-6]: postinstall Log Message: Pull up following revision(s) (requested by jmmv in ticket #419): usr.sbin/postinstall/postinstall: revision 1.136 Properly find atf configuration files in the source tree. My previous change dealt properly with etc.tgz only. Addresses PR bin/45870. To generate a diff of this commit: cvs rdiff -u -r1.129.2.6 -r1.129.2.7 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.129.2.6 src/usr.sbin/postinstall/postinstall:1.129.2.7 --- src/usr.sbin/postinstall/postinstall:1.129.2.6 Mon Jun 11 23:09:24 2012 +++ src/usr.sbin/postinstall/postinstall Mon Jul 16 22:08:03 2012 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: postinstall,v 1.129.2.6 2012/06/11 23:09:24 riz Exp $ +# $NetBSD: postinstall,v 1.129.2.7 2012/07/16 22:08:03 riz Exp $ # # Copyright (c) 2002-2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -1595,30 +1595,62 @@ do_tcpdumpchroot() # # atf # -additem atf "validate the _atf to _tests user/group renaming" +additem atf "install missing atf configuration files and validate them" do_atf() { [ -n "$1" ] || err 3 "USAGE: do_atf fix|check" op="$1" failed=0 - populate_dir "${op}" true \ - "${SRC_DIR}/etc/atf" "${DEST_DIR}/etc/atf" 644 \ - NetBSD.conf atf-run.hooks common.conf + # Ensure atf configuration files are in place. + if find_file_in_dirlist NetBSD.conf "NetBSD.conf" \ + "${SRC_DIR}/external/bsd/atf/etc/atf" \ + "${SRC_DIR}/etc/atf"; then + # ${dir} is set by find_file_in_dirlist() + populate_dir "${op}" true "${dir}" "${DEST_DIR}/etc/atf" 644 \ + NetBSD.conf common.conf || failed=1 + else + failed=1 + fi + if find_file_in_dirlist atf-run.hooks "atf-run.hooks" \ + "${SRC_DIR}/external/bsd/atf/dist/atf-run/sample" \ + "${SRC_DIR}/etc/atf"; then + # ${dir} is set by find_file_in_dirlist() + populate_dir "${op}" true "${dir}" "${DEST_DIR}/etc/atf" 644 \ + atf-run.hooks || failed=1 + else + failed=1 + fi + + # Validate the _atf to _tests user/group renaming. + if [ -f "${DEST_DIR}/etc/atf/common.conf" ]; then + handle_atf_user "${op}" || failed=1 + else + failed=1 + fi + + return ${failed} +} + +handle_atf_user() +{ + local op="$1" + local failed=0 - if grep '[^#]*unprivileged-user[ \t]*=.*_atf' ${DEST_DIR}/etc/atf/common.conf \ - >/dev/null + local conf="${DEST_DIR}/etc/atf/common.conf" + if grep '[^#]*unprivileged-user[ \t]*=.*_atf' "${conf}" >/dev/null then if [ "$1" = "fix" ]; then sed -e \ "/[^#]*unprivileged-user[\ t]*=/s/_atf/_tests/" \ - ${DEST_DIR}/etc/atf/common.conf >${DEST_DIR}/etc/atf/common.conf.new + "${conf}" >"${conf}.new" failed=$(( ${failed} + $? )) - mv ${DEST_DIR}/etc/atf/common.conf.new ${DEST_DIR}/etc/atf/common.conf + mv "${conf}.new" "${conf}" failed=$(( ${failed} + $? )) + msg "Set unprivileged-user=_tests in ${conf}" else - msg "unprivileged-user=_atf in ${DEST_DIR}/etc/atf/common.conf" \ - "should be _tests" + msg "unprivileged-user=_atf in ${conf} should be" \ + "unprivileged-user=_tests" failed=1 fi fi
CVS commit: [netbsd-6] src/sys/dev
Module Name:src Committed By: riz Date: Mon Jul 16 22:04:46 UTC 2012 Modified Files: src/sys/dev [netbsd-6]: ldvar.h Log Message: Pull up following revision(s) (requested by nonaka in ticket #418): sys/dev/ldvar.h: revision 1.21 use uint64_t for sc_disksize512. fixed the problem with ataraid volumes larger than 2 TiB. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.20.2.1 src/sys/dev/ldvar.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/ldvar.h diff -u src/sys/dev/ldvar.h:1.20 src/sys/dev/ldvar.h:1.20.2.1 --- src/sys/dev/ldvar.h:1.20 Thu Feb 2 19:43:01 2012 +++ src/sys/dev/ldvar.h Mon Jul 16 22:04:45 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ldvar.h,v 1.20 2012/02/02 19:43:01 tls Exp $ */ +/* $NetBSD: ldvar.h,v 1.20.2.1 2012/07/16 22:04:45 riz Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -46,7 +46,7 @@ struct ld_softc { int sc_ncylinders; /* # cylinders */ int sc_nheads; /* # heads */ int sc_nsectors; /* # sectors per track */ - int sc_disksize512; + uint64_t sc_disksize512; /* * The following are filled by hardware specific attachment code.
CVS commit: [netbsd-6] src/lib/libc/arch/arm/gen
Module Name:src Committed By: riz Date: Mon Jul 16 22:03:06 UTC 2012 Modified Files: src/lib/libc/arch/arm/gen [netbsd-6]: Makefile.inc Log Message: Pull up following revision(s) (requested by reinoud in ticket #416): lib/libc/arch/arm/gen/Makefile.inc: revision 1.17 On the libc/libgcc clashes cleanup that removed divsi3.o from libc, ARM/evbarm was forgotten. This patch fixes it making static binaries possible again! To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.16.8.1 src/lib/libc/arch/arm/gen/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/gen/Makefile.inc diff -u src/lib/libc/arch/arm/gen/Makefile.inc:1.16 src/lib/libc/arch/arm/gen/Makefile.inc:1.16.8.1 --- src/lib/libc/arch/arm/gen/Makefile.inc:1.16 Sun Dec 6 07:12:17 2009 +++ src/lib/libc/arch/arm/gen/Makefile.inc Mon Jul 16 22:03:06 2012 @@ -1,6 +1,6 @@ -# $NetBSD: Makefile.inc,v 1.16 2009/12/06 07:12:17 uebayasi Exp $ +# $NetBSD: Makefile.inc,v 1.16.8.1 2012/07/16 22:03:06 riz Exp $ -SRCS+= alloca.S byte_swap_2.S byte_swap_4.S bswap64.c divsi3.S \ +SRCS+= alloca.S byte_swap_2.S byte_swap_4.S bswap64.c \ fabs.c flt_rounds.c # Common ieee754 constants and functions
CVS commit: src/distrib/sets/lists/xcomp
Module Name:src Committed By: matt Date: Mon Jul 16 18:19:04 UTC 2012 Added Files: src/distrib/sets/lists/xcomp: md.vax Log Message: MKDEBUG fallout for vax. To generate a diff of this commit: cvs rdiff -u -r0 -r1.3 src/distrib/sets/lists/xcomp/md.vax Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/distrib/sets/lists/xcomp/md.vax diff -u /dev/null src/distrib/sets/lists/xcomp/md.vax:1.3 --- /dev/null Mon Jul 16 18:19:04 2012 +++ src/distrib/sets/lists/xcomp/md.vax Mon Jul 16 18:19:04 2012 @@ -0,0 +1,22 @@ +# $NetBSD: md.vax,v 1.3 2012/07/16 18:19:04 matt Exp $ +./usr/libdata/debug/usr/X11R7/bin/Xorg.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/bin/cvt.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/bin/gtf.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libkbd_drv.so.1.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libmouse_drv.so.1.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libws_drv.so.1.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libwsfb_drv.so.0.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/lib/modules/extensions/libdbe.so.0.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/lib/modules/extensions/libdri.so.0.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/lib/modules/extensions/libdri2.so.0.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/lib/modules/extensions/libextmod.so.0.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/lib/modules/extensions/libglx.so.0.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/lib/modules/extensions/librecord.so.0.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/lib/modules/extensions/libshadow.so.0.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/lib/modules/libexa.so.0.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/lib/modules/libfb.so.0.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/lib/modules/libi2c.so.0.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/lib/modules/libshadowfb.so.0.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/lib/modules/libvbe.so.0.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/lib/modules/libvgahw.so.0.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/lib/modules/libxaa.so.0.debug -unknown- debug,xorg
CVS commit: src/gnu/dist/gcc4/gcc/config/vax
Module Name:src Committed By: matt Date: Mon Jul 16 17:39:29 UTC 2012 Modified Files: src/gnu/dist/gcc4/gcc/config/vax: builtins.md vax.md Log Message: Fix ffssi2 again. Use a UNSPEC for the internal ffs. use (match_dup 1) since Z will be set if it is 0 just as if tst:SI was done. This can let gcc produce better code if you code appropriately. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/gnu/dist/gcc4/gcc/config/vax/builtins.md cvs rdiff -u -r1.15 -r1.16 src/gnu/dist/gcc4/gcc/config/vax/vax.md Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/gnu/dist/gcc4/gcc/config/vax/builtins.md diff -u src/gnu/dist/gcc4/gcc/config/vax/builtins.md:1.3 src/gnu/dist/gcc4/gcc/config/vax/builtins.md:1.4 --- src/gnu/dist/gcc4/gcc/config/vax/builtins.md:1.3 Wed Jul 11 13:34:45 2012 +++ src/gnu/dist/gcc4/gcc/config/vax/builtins.md Mon Jul 16 17:39:29 2012 @@ -25,7 +25,7 @@ " { rtx label = gen_label_rtx (); - emit_insn (gen_ffssi2_internal (operands[0], operands[1], operands[1])); + emit_insn (gen_unspec_ffssi2 (operands[0], operands[1])); emit_jump_insn (gen_bne (label)); emit_insn (gen_negsi2 (operands[0], const1_rtx)); emit_label (label); @@ -33,9 +33,15 @@ DONE; }") -(define_insn "ffssi2_internal" +;; +;; Set cc0 to match argument 1 since if it is 0, Z will be set just as +;; if a tst:SI was performed. If we did a match_dup 0, that wouldn't be +;; right since 0 will be set to (0+32) [the position (relative to the base) +;; of a bit one position to the left of the specified field]. +;; +(define_insn "unspec_ffssi2" [(set (match_operand:SI 0 "nonimmediate_operand" "=g") -(ffs:SI (match_operand:SI 1 "general_operand" "nrQ"))) - (set (cc0) (ffs:SI (match_operand:SI 2 "general_operand" "1")))] +(unspec:SI [(match_operand:SI 1 "general_operand" "nrQ")] VUNSPEC_FFS)) + (set (cc0) (match_dup 1))] "" "ffs $0,$32,%1,%0") Index: src/gnu/dist/gcc4/gcc/config/vax/vax.md diff -u src/gnu/dist/gcc4/gcc/config/vax/vax.md:1.15 src/gnu/dist/gcc4/gcc/config/vax/vax.md:1.16 --- src/gnu/dist/gcc4/gcc/config/vax/vax.md:1.15 Sun Feb 5 17:34:34 2012 +++ src/gnu/dist/gcc4/gcc/config/vax/vax.md Mon Jul 16 17:39:29 2012 @@ -34,6 +34,8 @@ [(VUNSPEC_BLOCKAGE 0) ; `blockage' insn to prevent scheduling across an ; insn in the code. (VUNSPEC_SYNC_ISTREAM 1) ; sequence of insns to sync the I-stream + (VUNSPEC_FFS 2) ; internal FFS for the expand + (VUNSPEC_FFC 3) ; internal FFC for the expand (VAX_AP_REGNUM 12) ; Register 12 contains the argument pointer (VAX_FP_REGNUM 13) ; Register 13 contains the frame pointer (VAX_SP_REGNUM 14) ; Register 14 contains the stack pointer
CVS commit: src/sys/dev/sysmon
Module Name:src Committed By: pgoyette Date: Mon Jul 16 13:55:01 UTC 2012 Modified Files: src/sys/dev/sysmon: sysmon_envsys.c sysmon_envsys_events.c sysmonvar.h Log Message: Extend previous changes so that even sensors which don't use a refresh() callback to update the value can be polled to provide rnd(4) entropy. To generate a diff of this commit: cvs rdiff -u -r1.120 -r1.121 src/sys/dev/sysmon/sysmon_envsys.c cvs rdiff -u -r1.100 -r1.101 src/sys/dev/sysmon/sysmon_envsys_events.c cvs rdiff -u -r1.42 -r1.43 src/sys/dev/sysmon/sysmonvar.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/sysmon/sysmon_envsys.c diff -u src/sys/dev/sysmon/sysmon_envsys.c:1.120 src/sys/dev/sysmon/sysmon_envsys.c:1.121 --- src/sys/dev/sysmon/sysmon_envsys.c:1.120 Sun Jul 15 18:33:07 2012 +++ src/sys/dev/sysmon/sysmon_envsys.c Mon Jul 16 13:55:01 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: sysmon_envsys.c,v 1.120 2012/07/15 18:33:07 pgoyette Exp $ */ +/* $NetBSD: sysmon_envsys.c,v 1.121 2012/07/16 13:55:01 pgoyette Exp $ */ /*- * Copyright (c) 2007, 2008 Juan Romero Pardines. @@ -64,7 +64,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys.c,v 1.120 2012/07/15 18:33:07 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys.c,v 1.121 2012/07/16 13:55:01 pgoyette Exp $"); #include #include @@ -358,8 +358,7 @@ sysmonioctl_envsys(dev_t dev, u_long cmd } if (tred->sensor < sme->sme_nsensors) { - if ((sme->sme_flags & SME_DISABLE_REFRESH) == 0 && - (sme->sme_flags & SME_POLL_ONLY) == 0) { + if ((sme->sme_flags & SME_POLL_ONLY) == 0) { mutex_enter(&sme->sme_mtx); sysmon_envsys_refresh_sensor(sme, edata); mutex_exit(&sme->sme_mtx); @@ -1015,8 +1014,7 @@ sme_initial_refresh(void *arg) mutex_enter(&sme->sme_mtx); sysmon_envsys_acquire(sme, true); TAILQ_FOREACH(edata, &sme->sme_sensors_list, sensors_head) - if ((sme->sme_flags & SME_DISABLE_REFRESH) == 0) - sysmon_envsys_refresh_sensor(sme, edata); + sysmon_envsys_refresh_sensor(sme, edata); sysmon_envsys_release(sme, true); mutex_exit(&sme->sme_mtx); } @@ -1436,14 +1434,11 @@ sme_get_max_value(struct sysmon_envsys * continue; /* - * refresh sensor data via sme_refresh only if the - * flag is not set. + * refresh sensor data */ - if (refresh && (sme->sme_flags & SME_DISABLE_REFRESH) == 0) { - mutex_enter(&sme->sme_mtx); - sysmon_envsys_refresh_sensor(sme, edata); - mutex_exit(&sme->sme_mtx); - } + mutex_enter(&sme->sme_mtx); + sysmon_envsys_refresh_sensor(sme, edata); + mutex_exit(&sme->sme_mtx); v = edata->value_cur; if (v > maxv) @@ -1513,14 +1508,11 @@ sme_update_dictionary(struct sysmon_envs */ TAILQ_FOREACH(edata, &sme->sme_sensors_list, sensors_head) { /* - * refresh sensor data via sme_refresh only if the - * flag is not set. + * refresh sensor data via sme_envsys_refresh_sensor */ - if ((sme->sme_flags & SME_DISABLE_REFRESH) == 0) { - mutex_enter(&sme->sme_mtx); - sysmon_envsys_refresh_sensor(sme, edata); - mutex_exit(&sme->sme_mtx); - } + mutex_enter(&sme->sme_mtx); + sysmon_envsys_refresh_sensor(sme, edata); + mutex_exit(&sme->sme_mtx); /* * retrieve sensor's dictionary. @@ -1896,11 +1888,11 @@ sme_userset_dictionary(struct sysmon_env props |= PROP_WARNMIN; } - if (props) { - if (edata->flags & ENVSYS_FMONNOTSUPP) { -error = ENOTSUP; -goto out; - } + if (props && (edata->flags & ENVSYS_FMONNOTSUPP) != 0) { + error = ENOTSUP; + goto out; + } + if (props || (edata->flags & ENVSYS_FHAS_ENTROPY) != 0) { error = sme_event_register(dict, edata, sme, &lims, props, (edata->flags & ENVSYS_FPERCENT)? @@ -1948,8 +1940,7 @@ sysmon_envsys_foreach_sensor(sysmon_envs sysmon_envsys_acquire(sme, false); TAILQ_FOREACH(sensor, &sme->sme_sensors_list, sensors_head) { - if (refresh && - (sme->sme_flags & SME_DISABLE_REFRESH) == 0) { + if (refresh) { mutex_enter(&sme->sme_mtx); sysmon_envsys_refresh_sensor(sme, sensor); mutex_exit(&sme->sme_mtx); @@ -1968,18 +1959,13 @@ sysmon_envsys_foreach_sensor(sysmon_envs void sysmon_envsys_refresh_sensor(struct sysmon_envsys *sme, envsys_data_t *edata) { - int32_t old_state; - int32_t old_value; - if (edata->flags & ENVSYS_FHAS_ENTROPY) { - old_state = edata->state; - old_value = edata->value_cur; - (*sme->sme_refresh)(sme, edata); - if (old_state != ENVSYS_SINVALID && - edata->state != ENVSYS_SINVALID && - old_value != edata->value_cur) - rnd_add_uint32(&edata->rnd_src, edata->value_cur); - } - else + if ((sme->sme_flags & SME_DISABLE_REFRESH) == 0) (*sme->sme_refresh)(sme, edata); + + if (edata->flags & ENVSYS_FHAS_ENTROPY && + edata->state != ENVSYS_SINVALID && + edata->value_prev != edata->value_cur) + rnd_add_uint32(&edata->rnd_src, edata->value_cur); + edata->value_prev = edat
CVS commit: src/sys/dev/dec
Module Name:src Committed By: abs Date: Mon Jul 16 12:55:36 UTC 2012 Modified Files: src/sys/dev/dec: dzkbd.c Log Message: revert last To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/dev/dec/dzkbd.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/dec/dzkbd.c diff -u src/sys/dev/dec/dzkbd.c:1.24 src/sys/dev/dec/dzkbd.c:1.25 --- src/sys/dev/dec/dzkbd.c:1.24 Mon Jul 16 12:52:47 2012 +++ src/sys/dev/dec/dzkbd.c Mon Jul 16 12:55:36 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: dzkbd.c,v 1.24 2012/07/16 12:52:47 abs Exp $ */ +/* $NetBSD: dzkbd.c,v 1.25 2012/07/16 12:55:36 abs Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dzkbd.c,v 1.24 2012/07/16 12:52:47 abs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dzkbd.c,v 1.25 2012/07/16 12:55:36 abs Exp $"); #include #include @@ -85,7 +85,6 @@ struct dzkbd_softc { int sc_enabled; int kbd_type; - int wsraw; device_t sc_wskbddev; }; @@ -287,11 +286,6 @@ dzkbd_ioctl(void *v, u_long cmd, void *d /* XXX don't dig in kbd internals */ *(int *)data = sc->sc_itl->dzi_ks.kcvol; return 0; -#ifdef WSDISPLAY_COMPAT_RAWKBD - case WSKBDIO_SETMODE: - sc->wsraw = *(int *)data == WSKBD_RAW; - return 0; -#endif } return (EPASSTHROUGH); }
CVS commit: src/sys/dev/dec
Module Name:src Committed By: abs Date: Mon Jul 16 12:52:47 UTC 2012 Modified Files: src/sys/dev/dec: dzkbd.c Log Message: Allow WSKBDIO_SETMODE To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/dev/dec/dzkbd.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/dec/dzkbd.c diff -u src/sys/dev/dec/dzkbd.c:1.23 src/sys/dev/dec/dzkbd.c:1.24 --- src/sys/dev/dec/dzkbd.c:1.23 Tue May 12 14:18:16 2009 +++ src/sys/dev/dec/dzkbd.c Mon Jul 16 12:52:47 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: dzkbd.c,v 1.23 2009/05/12 14:18:16 cegger Exp $ */ +/* $NetBSD: dzkbd.c,v 1.24 2012/07/16 12:52:47 abs Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dzkbd.c,v 1.23 2009/05/12 14:18:16 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dzkbd.c,v 1.24 2012/07/16 12:52:47 abs Exp $"); #include #include @@ -85,6 +85,7 @@ struct dzkbd_softc { int sc_enabled; int kbd_type; + int wsraw; device_t sc_wskbddev; }; @@ -286,6 +287,11 @@ dzkbd_ioctl(void *v, u_long cmd, void *d /* XXX don't dig in kbd internals */ *(int *)data = sc->sc_itl->dzi_ks.kcvol; return 0; +#ifdef WSDISPLAY_COMPAT_RAWKBD + case WSKBDIO_SETMODE: + sc->wsraw = *(int *)data == WSKBD_RAW; + return 0; +#endif } return (EPASSTHROUGH); }
CVS commit: xsrc/external/mit/xf86-input-keyboard/dist/src
Module Name:xsrc Committed By: abs Date: Mon Jul 16 12:50:25 UTC 2012 Modified Files: xsrc/external/mit/xf86-input-keyboard/dist/src: bsd_kbd.c Log Message: Add WSKBD_TYPE_LK201 To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 \ xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_kbd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_kbd.c diff -u xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_kbd.c:1.14 xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_kbd.c:1.15 --- xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_kbd.c:1.14 Sun Jul 24 00:45:04 2011 +++ xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_kbd.c Mon Jul 16 12:50:25 2012 @@ -411,6 +411,11 @@ OpenKeyboard(InputInfoPtr pInfo) printWsType("ADB", pInfo->name); break; #endif +#ifdef WSKBD_TYPE_LK201 + case WSKBD_TYPE_LK201: + printWsType("LK201", pInfo->name); + break; +#endif #ifdef WSKBD_TYPE_MAPLE case WSKBD_TYPE_MAPLE: printWsType("Maple", pInfo->name);
CVS commit: xsrc/external/mit/xf86-input-keyboard/dist/src
Module Name:xsrc Committed By: abs Date: Mon Jul 16 12:49:42 UTC 2012 Modified Files: xsrc/external/mit/xf86-input-keyboard/dist/src: bsd_KbdMap.c Log Message: Add a basic map for an LK201 keyboard To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 \ xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_KbdMap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_KbdMap.c diff -u xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_KbdMap.c:1.7 xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_KbdMap.c:1.8 --- xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_KbdMap.c:1.7 Sat Feb 25 15:38:46 2012 +++ xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_KbdMap.c Mon Jul 16 12:49:42 2012 @@ -826,6 +826,270 @@ TransMapRec wsAdb = { wsAdbMap }; +/* Map for LK201 keyboards */ +static CARD8 wsLk201Map[] = { + /* 0 */ KEY_F1, + /* 1 */ KEY_F2, + /* 2 */ KEY_F3, + /* 3 */ KEY_F4, + /* 4 */ KEY_F5, + /* 5 */ KEY_NOTUSED, + /* 6 */ KEY_NOTUSED, + /* 7 */ KEY_NOTUSED, + /* 8 */ KEY_NOTUSED, + /* 9 */ KEY_NOTUSED, + /* 10 */ KEY_NOTUSED, + /* 11 */ KEY_NOTUSED, + /* 12 */ KEY_NOTUSED, + /* 13 */ KEY_NOTUSED, + /* 14 */ KEY_F6, + /* 15 */ KEY_F7, + /* 16 */ KEY_F8, + /* 17 */ KEY_F9, + /* 18 */ KEY_F10, + /* 19 */ KEY_NOTUSED, + /* 20 */ KEY_NOTUSED, + /* 21 */ KEY_NOTUSED, + /* 22 */ KEY_NOTUSED, + /* 23 */ KEY_NOTUSED, + /* 24 */ KEY_NOTUSED, + /* 25 */ KEY_NOTUSED, + /* 26 */ KEY_NOTUSED, + /* 27 */ KEY_F11, + /* 28 */ KEY_F12, + /* 29 */ KEY_F13, + /* 30 */ KEY_F14, + /* 31 */ KEY_NOTUSED, + /* 32 */ KEY_NOTUSED, + /* 33 */ KEY_NOTUSED, + /* 34 */ KEY_NOTUSED, + /* 35 */ KEY_NOTUSED, + /* 36 */ KEY_NOTUSED, + /* 37 */ KEY_NOTUSED, + /* 38 */ KEY_Help, + /* 39 */ KEY_F16, /* Do */ + /* 40 */ KEY_NOTUSED, + /* 41 */ KEY_NOTUSED, + /* 42 */ KEY_F17, + /* 43 */ KEY_L8, /* F18 */ + /* 44 */ KEY_L9, /* F19 */ + /* 45 */ KEY_L10, /* F20 */ + /* 46 */ KEY_NOTUSED, + /* 47 */ KEY_NOTUSED, + /* 48 */ KEY_NOTUSED, + /* 49 */ KEY_NOTUSED, + /* 50 */ KEY_NOTUSED, + /* 51 */ KEY_NOTUSED, + /* 52 */ KEY_Home, /* Find */ + /* 53 */ KEY_Insert, /* Insert Here */ + /* 54 */ KEY_Delete, /* Re-move */ + /* 55 */ KEY_End, /* Select */ + /* 56 */ KEY_PgUp, /* Prev-Screen */ + /* 57 */ KEY_PgDown, /* Next-Screen */ + /* 58 */ KEY_NOTUSED, + /* 59 */ KEY_NOTUSED, + /* 60 */ KEY_KP_0, + /* 61 */ KEY_NOTUSED, + /* 62 */ KEY_KP_Decimal, + /* 63 */ KEY_KP_Enter, + /* 64 */ KEY_KP_1, + /* 65 */ KEY_KP_2, + /* 66 */ KEY_KP_3, + /* 67 */ KEY_KP_4, + /* 68 */ KEY_KP_5, + /* 69 */ KEY_KP_6, + /* 70 */ KEY_KP_Plus, /* KP Comma */ + /* 71 */ KEY_KP_7, + /* 72 */ KEY_KP_8, + /* 73 */ KEY_KP_9, + /* 74 */ KEY_KP_Minus, + /* 75 */ KEY_L1, /* PF1 */ + /* 76 */ KEY_L2, /* PF2 */ + /* 77 */ KEY_L3, /* PF3 */ + /* 78 */ KEY_L4, /* PF4 */ + /* 79 */ KEY_NOTUSED, + /* 80 */ KEY_NOTUSED, + /* 81 */ KEY_Left, + /* 82 */ KEY_Right, + /* 83 */ KEY_Down, + /* 84 */ KEY_Up, + /* 85 */ KEY_NOTUSED, + /* 86 */ KEY_NOTUSED, + /* 87 */ KEY_NOTUSED, + /* 88 */ KEY_ShiftL, + /* 89 */ KEY_LCtrl, + /* 90 */ KEY_CapsLock, + /* 91 */ KEY_Alt, /* Compose */ + /* 92 */ KEY_NOTUSED, + /* 93 */ KEY_NOTUSED, + /* 94 */ KEY_NOTUSED, + /* 95 */ KEY_NOTUSED, + /* 96 */ KEY_NOTUSED, + /* 97 */ KEY_NOTUSED, + /* 98 */ KEY_NOTUSED, + /* 99 */ KEY_NOTUSED, + /* 100 */ KEY_NOTUSED, + /* 101 */ KEY_NOTUSED, + /* 102 */ KEY_Delete, + /* 103 */ KEY_Enter, + /* 104 */ KEY_Tab, + /* 105 */ KEY_Escape, /* tilde */ + /* 106 */ KEY_1, + /* 107 */ KEY_Q, + /* 108 */ KEY_A, + /* 109 */ KEY_Z, + /* 110 */ KEY_NOTUSED, + /* 111 */ KEY_2, + /* 112 */ KEY_W, + /* 113 */ KEY_S, + /* 114 */ KEY_X, + /* 115 */ KEY_Less, + /* 116 */ KEY_NOTUSED, + /* 117 */ KEY_3, + /* 118 */ KEY_E, + /* 119 */ KEY_D, + /* 120 */ KEY_C, + /* 121 */ KEY_NOTUSED, + /* 122 */ KEY_4, + /* 123 */ KEY_R, + /* 124 */ KEY_F, + /* 125 */ KEY_V, + /* 126 */ KEY_Space, + /* 127 */ KEY_NOTUSED, + /* 128 */ KEY_5, + /* 129 */ KEY_T, + /* 130 */ KEY_G, + /* 131 */ KEY_B, + /* 132 */ KEY_NOTUSED, + /* 133 */ KEY_6, + /* 134 */ KEY_Y, + /* 135 */ KEY_H, + /* 136 */ KEY_N, + /* 137 */ KEY_NOTUSED, + /* 138 */ KEY_7, + /* 139 */ KEY_U, + /* 140 */ KEY_J, + /* 141 */ KEY_M, + /* 142 */ KEY_NOTUSED, + /* 143 */ KEY_8, + /* 144 */ KEY_I, + /* 145 */ KEY_K, + /* 146 */ KEY_Comma, + /* 147 */ KEY_NOTUSED, + /* 148 */ KEY_9, + /* 149 */ KEY_O, + /* 150 */ KEY_L, + /* 151 */ KEY_Period, + /* 152 */ KEY_NOTUSED, + /* 153 */ KEY_0, + /* 154 */ KEY_P, + /* 155 */ KEY_NOTUSED, + /* 156 */ KEY_SemiColon, + /* 157 */ KEY_Slash, + /* 158 */ KEY_NOTUSED, + /* 159 */ KEY_Equal, + /* 160 */ KEY_RBrace, + /* 161 */ KEY_BSlash, + /* 162 */ KEY_NOTUSED, + /* 163 */ KEY_Minus, + /* 164 */ KEY_LBrace, + /* 165 */ KEY_Quote, + /* 166 */ KEY_NOTUSED, + /* 167 */ KEY_NOTUSED, + /* 168 */ KEY_NOTUSED, + /* 169 */ KEY_NOTUSED, + /* 170 */ KEY_NOTUSED, + /* 171 */ KEY_NOTUSED, + /* 172 *
CVS commit: src/external/mit/xorg/server/drivers/xf86-input-keyboard
Module Name:src Committed By: abs Date: Mon Jul 16 12:48:43 UTC 2012 Modified Files: src/external/mit/xorg/server/drivers/xf86-input-keyboard: Makefile Log Message: Add vax to DEFAULT_TO_WSKBD To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 \ src/external/mit/xorg/server/drivers/xf86-input-keyboard/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/server/drivers/xf86-input-keyboard/Makefile diff -u src/external/mit/xorg/server/drivers/xf86-input-keyboard/Makefile:1.13 src/external/mit/xorg/server/drivers/xf86-input-keyboard/Makefile:1.14 --- src/external/mit/xorg/server/drivers/xf86-input-keyboard/Makefile:1.13 Tue Jun 21 11:42:20 2011 +++ src/external/mit/xorg/server/drivers/xf86-input-keyboard/Makefile Mon Jul 16 12:48:42 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.13 2011/06/21 11:42:20 nonaka Exp $ +# $NetBSD: Makefile,v 1.14 2012/07/16 12:48:42 abs Exp $ DRIVER= xf86-input-keyboard DRIVER_NAME= kbd_drv @@ -15,7 +15,7 @@ CPPFLAGS+= -DPCVT_SUPPORT .if ${MACHINE_ARCH} == "powerpc" || ${MACHINE} == "sparc" || \ ${MACHINE} == "sparc64" || ${MACHINE} == "sgimips" || \ -${MACHINE} == "shark" +${MACHINE} == "shark" || ${MACHINE} == "vax" CPPFLAGS+= -DDEFAULT_TO_WSKBD .endif
CVS commit: src/sys/arch/luna68k/dev
Module Name:src Committed By: tsutsui Date: Mon Jul 16 11:41:06 UTC 2012 Modified Files: src/sys/arch/luna68k/dev: omrasops.c Log Message: Fix typo in comment. From OpenBSD/luna88k. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/luna68k/dev/omrasops.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/luna68k/dev/omrasops.c diff -u src/sys/arch/luna68k/dev/omrasops.c:1.11 src/sys/arch/luna68k/dev/omrasops.c:1.12 --- src/sys/arch/luna68k/dev/omrasops.c:1.11 Wed Jul 27 14:17:54 2011 +++ src/sys/arch/luna68k/dev/omrasops.c Mon Jul 16 11:41:05 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: omrasops.c,v 1.11 2011/07/27 14:17:54 tsutsui Exp $ */ +/* $NetBSD: omrasops.c,v 1.12 2012/07/16 11:41:05 tsutsui Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -31,13 +31,13 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: omrasops.c,v 1.11 2011/07/27 14:17:54 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: omrasops.c,v 1.12 2012/07/16 11:41:05 tsutsui Exp $"); /* * Designed speficically for 'm68k bitorder'; * - most significant byte is stored at lower address, * - most significant bit is displayed at left most on screen. - * Implementation relys on; + * Implementation relies on; * - every memory references is done in aligned 32bit chunk, * - font glyphs are stored in 32bit padded. */
CVS commit: src/sys/arch/luna68k/dev
Module Name:src Committed By: tsutsui Date: Mon Jul 16 11:31:13 UTC 2012 Modified Files: src/sys/arch/luna68k/dev: lunaws.c Log Message: Use & not && to mask bits. From OpenBSD/luna88k To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/luna68k/dev/lunaws.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/luna68k/dev/lunaws.c diff -u src/sys/arch/luna68k/dev/lunaws.c:1.23 src/sys/arch/luna68k/dev/lunaws.c:1.24 --- src/sys/arch/luna68k/dev/lunaws.c:1.23 Wed Jul 27 14:17:54 2011 +++ src/sys/arch/luna68k/dev/lunaws.c Mon Jul 16 11:31:13 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: lunaws.c,v 1.23 2011/07/27 14:17:54 tsutsui Exp $ */ +/* $NetBSD: lunaws.c,v 1.24 2012/07/16 11:31:13 tsutsui Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: lunaws.c,v 1.23 2011/07/27 14:17:54 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lunaws.c,v 1.24 2012/07/16 11:31:13 tsutsui Exp $"); #include "wsmouse.h" @@ -228,7 +228,7 @@ wsintr(int chan) #endif } while ((rr = getsiocsr(sio)) & RR_RXRDY); } - if (rr && RR_TXRDY) + if (rr & RR_TXRDY) sio->sio_cmd = WR0_RSTPEND; /* not capable of transmit, yet */ }
CVS commit: src/sys/arch/sparc/stand/ofwboot
Module Name:src Committed By: tsutsui Date: Mon Jul 16 11:26:28 UTC 2012 Modified Files: src/sys/arch/sparc/stand/ofwboot: net.c net.h ofdev.c Log Message: Fix tftpboot which was broken by my botched WARNSfy in last year. Also add comments that mention libsa tftp requires network device socket in f_devdata in struct open_file, from spz@ in PR port-sparc64/46652. Briefly tested tftpboot and nfsboot on Ultra5. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sparc/stand/ofwboot/net.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/sparc/stand/ofwboot/net.h cvs rdiff -u -r1.32 -r1.33 src/sys/arch/sparc/stand/ofwboot/ofdev.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/sparc/stand/ofwboot/net.c diff -u src/sys/arch/sparc/stand/ofwboot/net.c:1.7 src/sys/arch/sparc/stand/ofwboot/net.c:1.8 --- src/sys/arch/sparc/stand/ofwboot/net.c:1.7 Sat May 21 15:50:42 2011 +++ src/sys/arch/sparc/stand/ofwboot/net.c Mon Jul 16 11:26:27 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: net.c,v 1.7 2011/05/21 15:50:42 tsutsui Exp $ */ +/* $NetBSD: net.c,v 1.8 2012/07/16 11:26:27 tsutsui Exp $ */ /* * Copyright (C) 1995 Wolfgang Solfrank. @@ -180,14 +180,28 @@ net_mountroot_bootp(void) return (0); } +/* + * libsa's tftp_open expects a pointer to netdev_sock, i.e. an (int *), + * in f_devdata, a pointer to which gets handed down from devopen(). + * + * Do not expect booting via different methods to have the same + * requirements or semantics. + * + * net_tftp_bootp uses net_mountroot_bootp because that incidentially does + * most of what it needs to do. It of course in no manner actually mounts + * anything, all that routine actually does is prepare the socket for the + * necessary net access, and print info for the user. + */ + int -net_tftp_bootp(struct of_dev *op) +net_tftp_bootp(int **sock) { net_mountroot_bootp(); if (myip.s_addr == 0) return(ENOENT); + *sock = &netdev_sock; return (0); } Index: src/sys/arch/sparc/stand/ofwboot/net.h diff -u src/sys/arch/sparc/stand/ofwboot/net.h:1.2 src/sys/arch/sparc/stand/ofwboot/net.h:1.3 --- src/sys/arch/sparc/stand/ofwboot/net.h:1.2 Sat May 21 15:50:42 2011 +++ src/sys/arch/sparc/stand/ofwboot/net.h Mon Jul 16 11:26:27 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: net.h,v 1.2 2011/05/21 15:50:42 tsutsui Exp $ */ +/* $NetBSD: net.h,v 1.3 2012/07/16 11:26:27 tsutsui Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ int net_open(struct of_dev *); int net_close(struct of_dev *); -int net_tftp_bootp(struct of_dev *); +int net_tftp_bootp(int **); int net_mountroot(void); #endif /* _OFWBOOT_NET_H */ Index: src/sys/arch/sparc/stand/ofwboot/ofdev.c diff -u src/sys/arch/sparc/stand/ofwboot/ofdev.c:1.32 src/sys/arch/sparc/stand/ofwboot/ofdev.c:1.33 --- src/sys/arch/sparc/stand/ofwboot/ofdev.c:1.32 Wed Jun 1 11:42:18 2011 +++ src/sys/arch/sparc/stand/ofwboot/ofdev.c Mon Jul 16 11:26:27 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ofdev.c,v 1.32 2011/06/01 11:42:18 tsutsui Exp $ */ +/* $NetBSD: ofdev.c,v 1.33 2012/07/16 11:26:27 tsutsui Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -536,7 +536,7 @@ open_again: if (!strncmp(*file,"/tftp:",6)) { *file += 6; memcpy(&file_system[0], &file_system_tftp, sizeof file_system[0]); - if (net_tftp_bootp(of->f_devdata)) { + if (net_tftp_bootp((int **)&of->f_devdata)) { net_close(&ofdev); goto bad; }
CVS commit: src/usr.bin/tftp
Module Name:src Committed By: he Date: Mon Jul 16 09:20:26 UTC 2012 Modified Files: src/usr.bin/tftp: main.c tftp.c Log Message: Undo the non-sharing of the "toplevel" jmp_buf between main.c and tftp.c, so that we don't get a core dump if a transfer time-out is experienced. Also, get rid of an extranous newline printed in the case of time-out. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/usr.bin/tftp/main.c cvs rdiff -u -r1.33 -r1.34 src/usr.bin/tftp/tftp.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/tftp/main.c diff -u src/usr.bin/tftp/main.c:1.31 src/usr.bin/tftp/main.c:1.32 --- src/usr.bin/tftp/main.c:1.31 Tue Mar 20 20:34:59 2012 +++ src/usr.bin/tftp/main.c Mon Jul 16 09:20:26 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.31 2012/03/20 20:34:59 matt Exp $ */ +/* $NetBSD: main.c,v 1.32 2012/07/16 09:20:26 he Exp $ */ /* * Copyright (c) 1983, 1993 @@ -36,7 +36,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19 #if 0 static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: main.c,v 1.31 2012/03/20 20:34:59 matt Exp $"); +__RCSID("$NetBSD: main.c,v 1.32 2012/07/16 09:20:26 he Exp $"); #endif #endif /* not lint */ @@ -87,6 +87,8 @@ u_int rexmtval = TIMEOUT; ushort mcmasterslave; int maxtimeout = 5 * TIMEOUT; +jmp_buf toplevel; + static int connected; static char mode[32]; static char line[LBUFLEN]; @@ -94,7 +96,6 @@ static int margc; static char *margv[20]; static const char *prompt = "tftp"; static charhostname[MAXHOSTNAMELEN]; -static jmp_buf toplevel; static void get(int, char **); static void help(int, char **); Index: src/usr.bin/tftp/tftp.c diff -u src/usr.bin/tftp/tftp.c:1.33 src/usr.bin/tftp/tftp.c:1.34 --- src/usr.bin/tftp/tftp.c:1.33 Tue Mar 20 20:34:59 2012 +++ src/usr.bin/tftp/tftp.c Mon Jul 16 09:20:26 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: tftp.c,v 1.33 2012/03/20 20:34:59 matt Exp $ */ +/* $NetBSD: tftp.c,v 1.34 2012/07/16 09:20:26 he Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)tftp.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: tftp.c,v 1.33 2012/03/20 20:34:59 matt Exp $"); +__RCSID("$NetBSD: tftp.c,v 1.34 2012/07/16 09:20:26 he Exp $"); #endif #endif /* not lint */ @@ -67,9 +67,10 @@ __RCSID("$NetBSD: tftp.c,v 1.33 2012/03/ #include "extern.h" #include "tftpsubs.h" +extern jmp_buf toplevel; + charackbuf[PKTSIZE]; int timeout; -jmp_buf toplevel; jmp_buf timeoutbuf; static void nak __P((int, struct sockaddr *)); @@ -749,7 +750,7 @@ timer(int sig) timeout += rexmtval; if (timeout >= maxtimeout) { - (void)printf("Transfer timed out.\n"); + (void)printf("Transfer timed out."); longjmp(toplevel, -1); } longjmp(timeoutbuf, 1);