CVS commit: src/distrib/evbsh3
Module Name:src Committed By: nonaka Date: Sat Jun 18 06:25:43 UTC 2011 Modified Files: src/distrib/evbsh3: Makefile Added Files: src/distrib/evbsh3/cdroms: Makefile src/distrib/evbsh3/cdroms/installcd: Makefile Log Message: Build evbsh3-${MACHINE_ARCH}cd.iso on build.sh iso-image target as other ports. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/distrib/evbsh3/Makefile cvs rdiff -u -r0 -r1.1 src/distrib/evbsh3/cdroms/Makefile cvs rdiff -u -r0 -r1.1 src/distrib/evbsh3/cdroms/installcd/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/evbsh3/Makefile diff -u src/distrib/evbsh3/Makefile:1.1 src/distrib/evbsh3/Makefile:1.2 --- src/distrib/evbsh3/Makefile:1.1 Tue Apr 6 15:54:31 2010 +++ src/distrib/evbsh3/Makefile Sat Jun 18 06:25:43 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2010/04/06 15:54:31 nonaka Exp $ +# $NetBSD: Makefile,v 1.2 2011/06/18 06:25:43 nonaka Exp $ .include bsd.own.mk .include ${NETBSDSRCDIR}/distrib/common/Makefile.distrib @@ -6,6 +6,10 @@ .if ${MACHINE_ARCH} == sh3el SUBDIR= instkernel .endif +SUBDIR+= cdroms TARGETS+= release +iso_image: + ${MAKEDIRTARGET} cdroms iso_image + .include bsd.subdir.mk Added files: Index: src/distrib/evbsh3/cdroms/Makefile diff -u /dev/null src/distrib/evbsh3/cdroms/Makefile:1.1 --- /dev/null Sat Jun 18 06:25:43 2011 +++ src/distrib/evbsh3/cdroms/Makefile Sat Jun 18 06:25:43 2011 @@ -0,0 +1,6 @@ +# $NetBSD: Makefile,v 1.1 2011/06/18 06:25:43 nonaka Exp $ + +SUBDIR= installcd +TARGETS+= release iso_image + +.include bsd.subdir.mk Index: src/distrib/evbsh3/cdroms/installcd/Makefile diff -u /dev/null src/distrib/evbsh3/cdroms/installcd/Makefile:1.1 --- /dev/null Sat Jun 18 06:25:43 2011 +++ src/distrib/evbsh3/cdroms/installcd/Makefile Sat Jun 18 06:25:43 2011 @@ -0,0 +1,6 @@ +# $NetBSD: Makefile,v 1.1 2011/06/18 06:25:43 nonaka Exp $ + +CDBASE= evbsh3-${MACHINE_ARCH}cd # gives ${CDBASE}.iso +CDRELEASE= true# include $RELEASEDIR/$MACHINE + +.include ${.CURDIR}/../../../common/Makefile.bootcd
CVS commit: src/sys/arch/evbppc/mpc85xx
Module Name:src Committed By: matt Date: Sat Jun 18 06:36:25 UTC 2011 Modified Files: src/sys/arch/evbppc/mpc85xx: autoconf.c Log Message: Whitespace cleanup To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbppc/mpc85xx/autoconf.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/evbppc/mpc85xx/autoconf.c diff -u src/sys/arch/evbppc/mpc85xx/autoconf.c:1.3 src/sys/arch/evbppc/mpc85xx/autoconf.c:1.4 --- src/sys/arch/evbppc/mpc85xx/autoconf.c:1.3 Thu Feb 17 13:57:12 2011 +++ src/sys/arch/evbppc/mpc85xx/autoconf.c Sat Jun 18 06:36:25 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.3 2011/02/17 13:57:12 matt Exp $ */ +/* $NetBSD: autoconf.c,v 1.4 2011/06/18 06:36:25 matt Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.3 2011/02/17 13:57:12 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.4 2011/06/18 06:36:25 matt Exp $); #define __INTR_PRIVATE @@ -47,8 +47,8 @@ #include sys/intr.h #include sys/systm.h #include sys/bus.h - #include sys/cpu.h + #include powerpc/booke/cpuvar.h /*
CVS commit: src/sys/arch
Module Name:src Committed By: matt Date: Sat Jun 18 06:37:39 UTC 2011 Modified Files: src/sys/arch/evbppc/mpc85xx: mpc85xx_start.S src/sys/arch/powerpc/booke: genassym.cf trap_subr.S Log Message: Use FRAME_Rn (like ibm4xx and oea) instead of FRAME_n. Include psl.h to get PSL_* values instead of getting them from assym.h To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbppc/mpc85xx/mpc85xx_start.S cvs rdiff -u -r1.4 -r1.5 src/sys/arch/powerpc/booke/genassym.cf \ src/sys/arch/powerpc/booke/trap_subr.S 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/mpc85xx/mpc85xx_start.S diff -u src/sys/arch/evbppc/mpc85xx/mpc85xx_start.S:1.4 src/sys/arch/evbppc/mpc85xx/mpc85xx_start.S:1.5 --- src/sys/arch/evbppc/mpc85xx/mpc85xx_start.S:1.4 Wed Jun 8 05:09:21 2011 +++ src/sys/arch/evbppc/mpc85xx/mpc85xx_start.S Sat Jun 18 06:37:38 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: mpc85xx_start.S,v 1.4 2011/06/08 05:09:21 matt Exp $ */ +/* $NetBSD: mpc85xx_start.S,v 1.5 2011/06/18 06:37:38 matt Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -37,7 +37,7 @@ #include sys/cdefs.h #include powerpc/asm.h -RCSID($NetBSD: mpc85xx_start.S,v 1.4 2011/06/08 05:09:21 matt Exp $) +RCSID($NetBSD: mpc85xx_start.S,v 1.5 2011/06/18 06:37:38 matt Exp $) #include opt_altivec.h #include opt_ddb.h @@ -54,6 +54,7 @@ #include powerpc/spr.h #include powerpc/trap.h +#include powerpc/psl.h #include powerpc/booke/pte.h #include powerpc/booke/spr.h #define LBC_PRIVATE Index: src/sys/arch/powerpc/booke/genassym.cf diff -u src/sys/arch/powerpc/booke/genassym.cf:1.4 src/sys/arch/powerpc/booke/genassym.cf:1.5 --- src/sys/arch/powerpc/booke/genassym.cf:1.4 Wed Jun 15 17:47:45 2011 +++ src/sys/arch/powerpc/booke/genassym.cf Sat Jun 18 06:37:38 2011 @@ -1,4 +1,4 @@ -# $NetBSD: genassym.cf,v 1.4 2011/06/15 17:47:45 matt Exp $ +# $NetBSD: genassym.cf,v 1.5 2011/06/18 06:37:38 matt Exp $ #- # Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. @@ -66,38 +66,38 @@ define FRAMELEN FRAMELEN define FRAME_TF offsetof(struct ktrapframe, ktf_tf) -define FRAME_0 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[0]) -define FRAME_1 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[1]) -define FRAME_2 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[2]) -define FRAME_3 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[3]) -define FRAME_4 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[4]) -define FRAME_5 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[5]) -define FRAME_6 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[6]) -define FRAME_7 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[7]) -define FRAME_8 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[8]) -define FRAME_9 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[9]) -define FRAME_10 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[10]) -define FRAME_11 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[11]) -define FRAME_12 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[12]) -define FRAME_13 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[13]) -define FRAME_14 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[14]) -define FRAME_15 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[15]) -define FRAME_16 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[16]) -define FRAME_17 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[17]) -define FRAME_18 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[18]) -define FRAME_19 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[19]) -define FRAME_20 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[20]) -define FRAME_21 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[21]) -define FRAME_22 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[22]) -define FRAME_23 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[23]) -define FRAME_24 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[24]) -define FRAME_25 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[25]) -define FRAME_26 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[26]) -define FRAME_27 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[27]) -define FRAME_28 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[28]) -define FRAME_29 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[29]) -define FRAME_30 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[30]) -define FRAME_31 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[31]) +define FRAME_R0 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[0]) +define FRAME_R1 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[1]) +define FRAME_R2 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[2]) +define FRAME_R3 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[3]) +define FRAME_R4 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[4]) +define FRAME_R5 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[5]) +define FRAME_R6 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[6]) +define FRAME_R7 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[7]) +define FRAME_R8 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[8]) +define
CVS commit: src/sys/arch/powerpc
Module Name:src Committed By: matt Date: Sat Jun 18 06:41:44 UTC 2011 Modified Files: src/sys/arch/powerpc/ibm4xx: board_prop.c clock.c cpu.c ibm40x_machdep.c ibm4xx_autoconf.c ibm4xx_machdep.c intr.c pmap.c trap.c src/sys/arch/powerpc/ibm4xx/dev: com_opb.c ecc_plb.c gpiic_opb.c ibm405gp.c if_emac.c mal.c opb.c opbvar.h plb.c plbvar.h src/sys/arch/powerpc/ibm4xx/openbios: openbios.c src/sys/arch/powerpc/ibm4xx/pci: pci_machdep.c src/sys/arch/powerpc/isa: isa_machdep_common.c src/sys/arch/powerpc/marvell: pic_discovery.c src/sys/arch/powerpc/pci: pci_machdep_common.c pci_machdep_ofw.c pciconf_indirect.c pciconf_ofmethod.c src/sys/arch/powerpc/pic: i8259_common.c pic_i8259.c pic_prepivr.c picvar.h src/sys/arch/powerpc/powerpc: bus_dma.c db_interface.c Removed Files: src/sys/arch/powerpc/pic: pic_soft.c Log Message: Use sys/foo.h instead of machine/foo.h if such a file exists. Don't assume sys/cpu.h includes powerpc/subarch/cpu*.h. Include it explicitly. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/powerpc/ibm4xx/board_prop.c cvs rdiff -u -r1.24 -r1.25 src/sys/arch/powerpc/ibm4xx/clock.c \ src/sys/arch/powerpc/ibm4xx/intr.c cvs rdiff -u -r1.29 -r1.30 src/sys/arch/powerpc/ibm4xx/cpu.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/powerpc/ibm4xx/ibm40x_machdep.c cvs rdiff -u -r1.14 -r1.15 src/sys/arch/powerpc/ibm4xx/ibm4xx_autoconf.c cvs rdiff -u -r1.15 -r1.16 src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c cvs rdiff -u -r1.66 -r1.67 src/sys/arch/powerpc/ibm4xx/pmap.c cvs rdiff -u -r1.60 -r1.61 src/sys/arch/powerpc/ibm4xx/trap.c cvs rdiff -u -r1.20 -r1.21 src/sys/arch/powerpc/ibm4xx/dev/com_opb.c cvs rdiff -u -r1.13 -r1.14 src/sys/arch/powerpc/ibm4xx/dev/ecc_plb.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/powerpc/ibm4xx/dev/gpiic_opb.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/powerpc/ibm4xx/dev/ibm405gp.c cvs rdiff -u -r1.38 -r1.39 src/sys/arch/powerpc/ibm4xx/dev/if_emac.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/powerpc/ibm4xx/dev/mal.c cvs rdiff -u -r1.25 -r1.26 src/sys/arch/powerpc/ibm4xx/dev/opb.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/powerpc/ibm4xx/dev/opbvar.h \ src/sys/arch/powerpc/ibm4xx/dev/plbvar.h cvs rdiff -u -r1.19 -r1.20 src/sys/arch/powerpc/ibm4xx/dev/plb.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/powerpc/ibm4xx/openbios/openbios.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/powerpc/ibm4xx/pci/pci_machdep.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/powerpc/isa/isa_machdep_common.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/powerpc/marvell/pic_discovery.c cvs rdiff -u -r1.11 -r1.12 src/sys/arch/powerpc/pci/pci_machdep_common.c cvs rdiff -u -r1.15 -r1.16 src/sys/arch/powerpc/pci/pci_machdep_ofw.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/powerpc/pci/pciconf_indirect.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/powerpc/pci/pciconf_ofmethod.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/powerpc/pic/i8259_common.c \ src/sys/arch/powerpc/pic/pic_prepivr.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/powerpc/pic/pic_i8259.c cvs rdiff -u -r1.4 -r0 src/sys/arch/powerpc/pic/pic_soft.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/powerpc/pic/picvar.h cvs rdiff -u -r1.40 -r1.41 src/sys/arch/powerpc/powerpc/bus_dma.c cvs rdiff -u -r1.45 -r1.46 src/sys/arch/powerpc/powerpc/db_interface.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/powerpc/ibm4xx/board_prop.c diff -u src/sys/arch/powerpc/ibm4xx/board_prop.c:1.3 src/sys/arch/powerpc/ibm4xx/board_prop.c:1.4 --- src/sys/arch/powerpc/ibm4xx/board_prop.c:1.3 Fri May 5 18:04:41 2006 +++ src/sys/arch/powerpc/ibm4xx/board_prop.c Sat Jun 18 06:41:41 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: board_prop.c,v 1.3 2006/05/05 18:04:41 thorpej Exp $ */ +/* $NetBSD: board_prop.c,v 1.4 2011/06/18 06:41:41 matt Exp $ */ /* * Copyright (c) 2004 Shigeyuki Fukushima. @@ -31,14 +31,15 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: board_prop.c,v 1.3 2006/05/05 18:04:41 thorpej Exp $); +__KERNEL_RCSID(0, $NetBSD: board_prop.c,v 1.4 2011/06/18 06:41:41 matt Exp $); #include sys/param.h #include sys/systm.h +#include sys/cpu.h #include prop/proplib.h -#include machine/cpu.h +#include powerpc/ibm4xx/cpu.h prop_dictionary_t board_properties; Index: src/sys/arch/powerpc/ibm4xx/clock.c diff -u src/sys/arch/powerpc/ibm4xx/clock.c:1.24 src/sys/arch/powerpc/ibm4xx/clock.c:1.25 --- src/sys/arch/powerpc/ibm4xx/clock.c:1.24 Tue Jan 18 01:02:53 2011 +++ src/sys/arch/powerpc/ibm4xx/clock.c Sat Jun 18 06:41:41 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: clock.c,v 1.24 2011/01/18 01:02:53 matt Exp $ */ +/* $NetBSD: clock.c,v 1.25 2011/06/18 06:41:41 matt Exp $ */ /* $OpenBSD: clock.c,v 1.3 1997/10/13 13:42:53 pefo Exp $ */ /* @@ -33,21 +33,21 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: clock.c,v 1.24 2011/01/18 01:02:53 matt
CVS commit: src/sys/arch/powerpc/ibm4xx/dev
Module Name:src Committed By: matt Date: Sat Jun 18 08:17:58 UTC 2011 Modified Files: src/sys/arch/powerpc/ibm4xx/dev: mal.c Log Message: Use __builtin_clz instead of our own cntlzw To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/powerpc/ibm4xx/dev/mal.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/ibm4xx/dev/mal.c diff -u src/sys/arch/powerpc/ibm4xx/dev/mal.c:1.2 src/sys/arch/powerpc/ibm4xx/dev/mal.c:1.3 --- src/sys/arch/powerpc/ibm4xx/dev/mal.c:1.2 Sat Jun 18 06:41:42 2011 +++ src/sys/arch/powerpc/ibm4xx/dev/mal.c Sat Jun 18 08:17:58 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: mal.c,v 1.2 2011/06/18 06:41:42 matt Exp $ */ +/* $NetBSD: mal.c,v 1.3 2011/06/18 08:17:58 matt Exp $ */ /* * Copyright (c) 2010 KIYOHARA Takashi * All rights reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mal.c,v 1.2 2011/06/18 06:41:42 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: mal.c,v 1.3 2011/06/18 08:17:58 matt Exp $); #include sys/param.h #include sys/device.h @@ -39,7 +39,7 @@ #include powerpc/ibm4xx/dev/malvar.h #include powerpc/ibm4xx/spr.h -#define STAT_TO_CHAN(stat) cntlzw(stat) +#define STAT_TO_CHAN(stat) __builtin_clz(stat) static int mal_txeob_intr(void *);
CVS commit: src/sys/arch/powerpc/ibm4xx
Module Name:src Committed By: matt Date: Sat Jun 18 08:21:20 UTC 2011 Modified Files: src/sys/arch/powerpc/ibm4xx: cpu.c Log Message: Constify cputab. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/arch/powerpc/ibm4xx/cpu.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/ibm4xx/cpu.c diff -u src/sys/arch/powerpc/ibm4xx/cpu.c:1.30 src/sys/arch/powerpc/ibm4xx/cpu.c:1.31 --- src/sys/arch/powerpc/ibm4xx/cpu.c:1.30 Sat Jun 18 06:41:41 2011 +++ src/sys/arch/powerpc/ibm4xx/cpu.c Sat Jun 18 08:21:20 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.30 2011/06/18 06:41:41 matt Exp $ */ +/* $NetBSD: cpu.c,v 1.31 2011/06/18 08:21:20 matt Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.30 2011/06/18 06:41:41 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.31 2011/06/18 08:21:20 matt Exp $); #include sys/param.h #include sys/systm.h @@ -56,7 +56,7 @@ u_int mask; const char *name; }; -static struct cputab models[] = { +static const struct cputab models[] = { { PVR_401A1, 0x, 401A1 }, { PVR_401B2, 0x, 401B21 }, { PVR_401C2, 0x, 401C2 }, @@ -117,7 +117,7 @@ static void cpuattach(device_t parent, device_t self, void *aux) { - struct cputab *cp = models; + const struct cputab *cp = models; u_int pvr; u_int processor_freq; prop_number_t freq; @@ -166,7 +166,7 @@ void cpu_probe_cache(void) { - struct cputab *cp = models; + const struct cputab *cp = models; u_int pvr; pvr = mfpvr();
CVS commit: [netbsd-4] src/dist/bind
Module Name:src Committed By: bouyer Date: Sat Jun 18 10:36:32 UTC 2011 Modified Files: src/dist/bind [netbsd-4]: CHANGES version src/dist/bind/lib/dns [netbsd-4]: api ncache.c rdataset.c validator.c src/dist/bind/lib/dns/include/dns [netbsd-4]: rdataset.h Log Message: Apply patch, requested by spz in ticket #1430: dist/bind/CHANGES: patch dist/bind/version: patch dist/bind/lib/dns/api: patch dist/bind/lib/dns/ncache.c: patch dist/bind/lib/dns/rdataset.c: patch dist/bind/lib/dns/validator.c: patch dist/bind/lib/dns/include/dns/rdataset.h: patch Fix security issue: An authoritative name server sending a negative response containing a very large RRset could trigger an off-by-one error in the ncache code and crash named. Fix bug: Named could fail to validate zones listed in a DLV that validated insecure without using DLV and had DS records in the parent zone. To generate a diff of this commit: cvs rdiff -u -r1.1.1.4.4.6 -r1.1.1.4.4.7 src/dist/bind/CHANGES cvs rdiff -u -r1.1.1.4.4.7 -r1.1.1.4.4.8 src/dist/bind/version cvs rdiff -u -r1.1.1.4.4.5 -r1.1.1.4.4.6 src/dist/bind/lib/dns/api cvs rdiff -u -r1.1.1.3.4.2 -r1.1.1.3.4.3 src/dist/bind/lib/dns/ncache.c \ src/dist/bind/lib/dns/rdataset.c cvs rdiff -u -r1.4.4.5 -r1.4.4.6 src/dist/bind/lib/dns/validator.c cvs rdiff -u -r1.1.1.3.4.2 -r1.1.1.3.4.3 \ src/dist/bind/lib/dns/include/dns/rdataset.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/dist/bind/CHANGES diff -u src/dist/bind/CHANGES:1.1.1.4.4.6 src/dist/bind/CHANGES:1.1.1.4.4.7 --- src/dist/bind/CHANGES:1.1.1.4.4.6 Sun Jan 23 21:47:02 2011 +++ src/dist/bind/CHANGES Sat Jun 18 10:36:30 2011 @@ -1,3 +1,14 @@ + --- 9.4-ESV-R4-P1 released --- + +3121. [security] An authoritative name server sending a negative +response containing a very large RRset could +trigger an off-by-one error in the ncache code +and crash named. [RT #24650] + +3120. [bug] Named could fail to validate zones listed in a DLV + that validated insecure without using DLV and had + DS records in the parent zone. [RT #24631] + --- 9.4-ESV-R4 released --- 2970. [security] Adding a NO DATA negative cache entry failed to clear Index: src/dist/bind/version diff -u src/dist/bind/version:1.1.1.4.4.7 src/dist/bind/version:1.1.1.4.4.8 --- src/dist/bind/version:1.1.1.4.4.7 Sun Jan 23 21:47:07 2011 +++ src/dist/bind/version Sat Jun 18 10:36:30 2011 @@ -1,4 +1,4 @@ -# Id: version,v 1.29.134.32 2010/11/18 01:34:50 marka Exp +# $Id: version,v 1.1.1.4.4.8 2011/06/18 10:36:30 bouyer Exp $ # # This file must follow /bin/sh rules. It is imported directly via # configure. @@ -7,4 +7,4 @@ MINORVER=4 PATCHVER= RELEASETYPE=-ESV -RELEASEVER=-R4 +RELEASEVER=-R4-P1 Index: src/dist/bind/lib/dns/api diff -u src/dist/bind/lib/dns/api:1.1.1.4.4.5 src/dist/bind/lib/dns/api:1.1.1.4.4.6 --- src/dist/bind/lib/dns/api:1.1.1.4.4.5 Sun Jan 23 21:47:37 2011 +++ src/dist/bind/lib/dns/api Sat Jun 18 10:36:31 2011 @@ -1,3 +1,3 @@ LIBINTERFACE = 39 -LIBREVISION = 1 +LIBREVISION = 3 LIBAGE = 1 Index: src/dist/bind/lib/dns/ncache.c diff -u src/dist/bind/lib/dns/ncache.c:1.1.1.3.4.2 src/dist/bind/lib/dns/ncache.c:1.1.1.3.4.3 --- src/dist/bind/lib/dns/ncache.c:1.1.1.3.4.2 Sun Jan 23 21:47:38 2011 +++ src/dist/bind/lib/dns/ncache.c Sat Jun 18 10:36:31 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ncache.c,v 1.1.1.3.4.2 2011/01/23 21:47:38 bouyer Exp $ */ +/* $NetBSD: ncache.c,v 1.1.1.3.4.3 2011/06/18 10:36:31 bouyer Exp $ */ /* * Copyright (C) 2004, 2005, 2010 Internet Systems Consortium, Inc. (ISC) @@ -17,7 +17,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* Id: ncache.c,v 1.36.18.8 2010/06/03 23:46:10 tbox Exp */ +/* Id: ncache.c,v 1.36.18.8.10.1 2011-05-26 23:56:27 each Exp */ /*! \file */ @@ -177,7 +177,7 @@ */ isc_buffer_availableregion(buffer, r); - if (r.length 2) + if (r.length 3) return (ISC_R_NOSPACE); isc_buffer_putuint16(buffer, rdataset-type); Index: src/dist/bind/lib/dns/rdataset.c diff -u src/dist/bind/lib/dns/rdataset.c:1.1.1.3.4.2 src/dist/bind/lib/dns/rdataset.c:1.1.1.3.4.3 --- src/dist/bind/lib/dns/rdataset.c:1.1.1.3.4.2 Sun Jan 23 21:47:39 2011 +++ src/dist/bind/lib/dns/rdataset.c Sat Jun 18 10:36:31 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rdataset.c,v 1.1.1.3.4.2 2011/01/23 21:47:39 bouyer Exp $ */ +/* $NetBSD: rdataset.c,v 1.1.1.3.4.3 2011/06/18 10:36:31 bouyer Exp $ */ /* * Copyright (C) 2004-2006, 2009, 2010 Internet Systems Consortium, Inc. (ISC) @@ -17,7 +17,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* Id: rdataset.c,v 1.72.18.9 2010/02/26 23:46:36 tbox
CVS commit: [netbsd-4] src/doc
Module Name:src Committed By: bouyer Date: Sat Jun 18 10:37:45 UTC 2011 Modified Files: src/doc [netbsd-4]: CHANGES-4.1 Log Message: Ticket #1430 To generate a diff of this commit: cvs rdiff -u -r1.1.2.224 -r1.1.2.225 src/doc/CHANGES-4.1 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-4.1 diff -u src/doc/CHANGES-4.1:1.1.2.224 src/doc/CHANGES-4.1:1.1.2.225 --- src/doc/CHANGES-4.1:1.1.2.224 Mon May 9 19:39:18 2011 +++ src/doc/CHANGES-4.1 Sat Jun 18 10:37:45 2011 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-4.1,v 1.1.2.224 2011/05/09 19:39:18 bouyer Exp $ +# $NetBSD: CHANGES-4.1,v 1.1.2.225 2011/06/18 10:37:45 bouyer Exp $ A complete list of changes from the NetBSD 4.0 release to the NetBSD 4.1 release: @@ -4460,3 +4460,20 @@ uninitialized data as res_state. [taca, ticket #1429] +dist/bind/CHANGES:patch +dist/bind/version:patch +dist/bind/lib/dns/api:patch +dist/bind/lib/dns/ncache.c: patch +dist/bind/lib/dns/rdataset.c: patch +dist/bind/lib/dns/validator.c: patch +dist/bind/lib/dns/include/dns/rdataset.h: patch + + Fix security issue: An authoritative name server sending a negative + response containing a very large RRset could + trigger an off-by-one error in the ncache code + and crash named. + Fix bug: Named could fail to validate zones listed in a DLV + that validated insecure without using DLV and had + DS records in the parent zone. + [spz, ticket #1430] +
CVS commit: [netbsd-4-0] src/dist/bind
Module Name:src Committed By: bouyer Date: Sat Jun 18 10:38:28 UTC 2011 Modified Files: src/dist/bind [netbsd-4-0]: CHANGES version src/dist/bind/lib/dns [netbsd-4-0]: api ncache.c rdataset.c validator.c src/dist/bind/lib/dns/include/dns [netbsd-4-0]: rdataset.h Log Message: Apply patch, requested by spz in ticket #1430: dist/bind/CHANGES: patch dist/bind/version: patch dist/bind/lib/dns/api: patch dist/bind/lib/dns/ncache.c: patch dist/bind/lib/dns/rdataset.c: patch dist/bind/lib/dns/validator.c: patch dist/bind/lib/dns/include/dns/rdataset.h: patch Fix security issue: An authoritative name server sending a negative response containing a very large RRset could trigger an off-by-one error in the ncache code and crash named. Fix bug: Named could fail to validate zones listed in a DLV that validated insecure without using DLV and had DS records in the parent zone. To generate a diff of this commit: cvs rdiff -u -r1.1.1.4.4.2.2.4 -r1.1.1.4.4.2.2.5 src/dist/bind/CHANGES cvs rdiff -u -r1.1.1.4.4.3.2.4 -r1.1.1.4.4.3.2.5 src/dist/bind/version cvs rdiff -u -r1.1.1.4.4.1.2.4 -r1.1.1.4.4.1.2.5 src/dist/bind/lib/dns/api cvs rdiff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.2 \ src/dist/bind/lib/dns/ncache.c src/dist/bind/lib/dns/rdataset.c cvs rdiff -u -r1.4.4.2.2.3 -r1.4.4.2.2.4 src/dist/bind/lib/dns/validator.c cvs rdiff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.2 \ src/dist/bind/lib/dns/include/dns/rdataset.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/dist/bind/CHANGES diff -u src/dist/bind/CHANGES:1.1.1.4.4.2.2.4 src/dist/bind/CHANGES:1.1.1.4.4.2.2.5 --- src/dist/bind/CHANGES:1.1.1.4.4.2.2.4 Sun Jan 23 21:51:11 2011 +++ src/dist/bind/CHANGES Sat Jun 18 10:38:27 2011 @@ -1,3 +1,14 @@ + --- 9.4-ESV-R4-P1 released --- + +3121. [security] An authoritative name server sending a negative +response containing a very large RRset could +trigger an off-by-one error in the ncache code +and crash named. [RT #24650] + +3120. [bug] Named could fail to validate zones listed in a DLV + that validated insecure without using DLV and had + DS records in the parent zone. [RT #24631] + --- 9.4-ESV-R4 released --- 2970. [security] Adding a NO DATA negative cache entry failed to clear Index: src/dist/bind/version diff -u src/dist/bind/version:1.1.1.4.4.3.2.4 src/dist/bind/version:1.1.1.4.4.3.2.5 --- src/dist/bind/version:1.1.1.4.4.3.2.4 Sun Jan 23 21:51:17 2011 +++ src/dist/bind/version Sat Jun 18 10:38:27 2011 @@ -1,4 +1,4 @@ -# Id: version,v 1.29.134.32 2010/11/18 01:34:50 marka Exp +# $Id: version,v 1.1.1.4.4.3.2.5 2011/06/18 10:38:27 bouyer Exp $ # # This file must follow /bin/sh rules. It is imported directly via # configure. @@ -7,4 +7,4 @@ MINORVER=4 PATCHVER= RELEASETYPE=-ESV -RELEASEVER=-R4 +RELEASEVER=-R4-P1 Index: src/dist/bind/lib/dns/api diff -u src/dist/bind/lib/dns/api:1.1.1.4.4.1.2.4 src/dist/bind/lib/dns/api:1.1.1.4.4.1.2.5 --- src/dist/bind/lib/dns/api:1.1.1.4.4.1.2.4 Sun Jan 23 21:52:10 2011 +++ src/dist/bind/lib/dns/api Sat Jun 18 10:38:28 2011 @@ -1,3 +1,3 @@ LIBINTERFACE = 39 -LIBREVISION = 1 +LIBREVISION = 3 LIBAGE = 1 Index: src/dist/bind/lib/dns/ncache.c diff -u src/dist/bind/lib/dns/ncache.c:1.1.1.3.4.1.2.1 src/dist/bind/lib/dns/ncache.c:1.1.1.3.4.1.2.2 --- src/dist/bind/lib/dns/ncache.c:1.1.1.3.4.1.2.1 Sun Jan 23 21:52:11 2011 +++ src/dist/bind/lib/dns/ncache.c Sat Jun 18 10:38:28 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ncache.c,v 1.1.1.3.4.1.2.1 2011/01/23 21:52:11 bouyer Exp $ */ +/* $NetBSD: ncache.c,v 1.1.1.3.4.1.2.2 2011/06/18 10:38:28 bouyer Exp $ */ /* * Copyright (C) 2004, 2005, 2010 Internet Systems Consortium, Inc. (ISC) @@ -17,7 +17,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* Id: ncache.c,v 1.36.18.8 2010/06/03 23:46:10 tbox Exp */ +/* Id: ncache.c,v 1.36.18.8.10.1 2011-05-26 23:56:27 each Exp */ /*! \file */ @@ -177,7 +177,7 @@ */ isc_buffer_availableregion(buffer, r); - if (r.length 2) + if (r.length 3) return (ISC_R_NOSPACE); isc_buffer_putuint16(buffer, rdataset-type); Index: src/dist/bind/lib/dns/rdataset.c diff -u src/dist/bind/lib/dns/rdataset.c:1.1.1.3.4.1.2.1 src/dist/bind/lib/dns/rdataset.c:1.1.1.3.4.1.2.2 --- src/dist/bind/lib/dns/rdataset.c:1.1.1.3.4.1.2.1 Sun Jan 23 21:52:12 2011 +++ src/dist/bind/lib/dns/rdataset.c Sat Jun 18 10:38:28 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rdataset.c,v 1.1.1.3.4.1.2.1 2011/01/23 21:52:12 bouyer Exp $ */ +/* $NetBSD: rdataset.c,v 1.1.1.3.4.1.2.2 2011/06/18 10:38:28 bouyer Exp $ */ /* * Copyright (C) 2004-2006, 2009, 2010 Internet Systems
CVS commit: [netbsd-4-0] src/doc
Module Name:src Committed By: bouyer Date: Sat Jun 18 10:39:12 UTC 2011 Modified Files: src/doc [netbsd-4-0]: CHANGES-4.0.2 Log Message: Ticket #1430 To generate a diff of this commit: cvs rdiff -u -r1.1.2.85 -r1.1.2.86 src/doc/CHANGES-4.0.2 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-4.0.2 diff -u src/doc/CHANGES-4.0.2:1.1.2.85 src/doc/CHANGES-4.0.2:1.1.2.86 --- src/doc/CHANGES-4.0.2:1.1.2.85 Thu Apr 7 17:33:43 2011 +++ src/doc/CHANGES-4.0.2 Sat Jun 18 10:39:12 2011 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-4.0.2,v 1.1.2.85 2011/04/07 17:33:43 riz Exp $ +# $NetBSD: CHANGES-4.0.2,v 1.1.2.86 2011/06/18 10:39:12 bouyer Exp $ A complete list of changes from the NetBSD 4.0.1 release to the NetBSD 4.0.2 release: @@ -1211,3 +1211,20 @@ response values. [christos, ticket #1427] +dist/bind/CHANGES:patch +dist/bind/version:patch +dist/bind/lib/dns/api:patch +dist/bind/lib/dns/ncache.c: patch +dist/bind/lib/dns/rdataset.c: patch +dist/bind/lib/dns/validator.c: patch +dist/bind/lib/dns/include/dns/rdataset.h: patch + + Fix security issue: An authoritative name server sending a negative + response containing a very large RRset could + trigger an off-by-one error in the ncache code + and crash named. + Fix bug: Named could fail to validate zones listed in a DLV + that validated insecure without using DLV and had + DS records in the parent zone. + [spz, ticket #1430] +
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: bouyer Date: Sat Jun 18 11:21:44 UTC 2011 Modified Files: src/doc [netbsd-5]: CHANGES-5.2 Log Message: ticket #1634 To generate a diff of this commit: cvs rdiff -u -r1.1.2.82 -r1.1.2.83 src/doc/CHANGES-5.2 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-5.2 diff -u src/doc/CHANGES-5.2:1.1.2.82 src/doc/CHANGES-5.2:1.1.2.83 --- src/doc/CHANGES-5.2:1.1.2.82 Sun May 22 15:34:12 2011 +++ src/doc/CHANGES-5.2 Sat Jun 18 11:21:43 2011 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.2,v 1.1.2.82 2011/05/22 15:34:12 bouyer Exp $ +# $NetBSD: CHANGES-5.2,v 1.1.2.83 2011/06/18 11:21:43 bouyer Exp $ A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2 release: @@ -5224,3 +5224,13 @@ Also fix bp-b_flags in writedisklabel(9) error path. [tsutsui, ticket #1621] +dist/bind/ patch +distrib/sets/lists/base/md.amd64 patch +distrib/sets/lists/base/md.sparc64 patch +distrib/sets/lists/base/shl.mipatch +lib/libdns/shlib_versionpatch +lib/libisc/shlib_versionpatch + + Update bind to 9.7.3-P1, fixing CVE-2011-1910 and CVE-2011-0414 + [spz, ticket #1634] +
CVS commit: [netbsd-5-1] src/doc
Module Name:src Committed By: bouyer Date: Sat Jun 18 11:30:29 UTC 2011 Modified Files: src/doc [netbsd-5-1]: CHANGES-5.1.1 Log Message: ticket #1634 To generate a diff of this commit: cvs rdiff -u -r1.1.2.26 -r1.1.2.27 src/doc/CHANGES-5.1.1 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-5.1.1 diff -u src/doc/CHANGES-5.1.1:1.1.2.26 src/doc/CHANGES-5.1.1:1.1.2.27 --- src/doc/CHANGES-5.1.1:1.1.2.26 Fri May 20 19:32:58 2011 +++ src/doc/CHANGES-5.1.1 Sat Jun 18 11:30:29 2011 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1.1,v 1.1.2.26 2011/05/20 19:32:58 bouyer Exp $ +# $NetBSD: CHANGES-5.1.1,v 1.1.2.27 2011/06/18 11:30:29 bouyer Exp $ A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.1.1 release: @@ -2431,3 +2431,13 @@ From Alexander Nasonov [joerg, ticket #1611] +dist/bind/ patch +distrib/sets/lists/base/md.amd64 patch +distrib/sets/lists/base/md.sparc64 patch +distrib/sets/lists/base/shl.mipatch +lib/libdns/shlib_versionpatch +lib/libisc/shlib_versionpatch + + Update bind to 9.7.3-P1, fixing CVE-2011-1910 and CVE-2011-0414 + [spz, ticket #1634] +
CVS commit: [netbsd-5-0] src/doc
Module Name:src Committed By: bouyer Date: Sat Jun 18 11:46:32 UTC 2011 Modified Files: src/doc [netbsd-5-0]: CHANGES-5.0.3 Log Message: ticket #1634 To generate a diff of this commit: cvs rdiff -u -r1.1.2.41 -r1.1.2.42 src/doc/CHANGES-5.0.3 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-5.0.3 diff -u src/doc/CHANGES-5.0.3:1.1.2.41 src/doc/CHANGES-5.0.3:1.1.2.42 --- src/doc/CHANGES-5.0.3:1.1.2.41 Sat May 21 13:32:27 2011 +++ src/doc/CHANGES-5.0.3 Sat Jun 18 11:46:32 2011 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.0.3,v 1.1.2.41 2011/05/21 13:32:27 bouyer Exp $ +# $NetBSD: CHANGES-5.0.3,v 1.1.2.42 2011/06/18 11:46:32 bouyer Exp $ A complete list of changes from the NetBSD 5.0.2 release to the NetBSD 5.0.3 release: @@ -2748,3 +2748,13 @@ Fixes CVE-2011-996 [spz, ticket #1603] +dist/bind/ patch +distrib/sets/lists/base/md.amd64 patch +distrib/sets/lists/base/md.sparc64 patch +distrib/sets/lists/base/shl.mipatch +lib/libdns/shlib_versionpatch +lib/libisc/shlib_versionpatch + + Update bind to 9.7.3-P1, fixing CVE-2011-1910 and CVE-2011-0414 + [spz, ticket #1634] +
CVS commit: src/sys/arch/arm/xscale
Module Name:src Committed By: nonaka Date: Sat Jun 18 13:52:25 UTC 2011 Modified Files: src/sys/arch/arm/xscale: pxa2x0reg.h Log Message: Added some I2C register definition. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/arm/xscale/pxa2x0reg.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/xscale/pxa2x0reg.h diff -u src/sys/arch/arm/xscale/pxa2x0reg.h:1.21 src/sys/arch/arm/xscale/pxa2x0reg.h:1.22 --- src/sys/arch/arm/xscale/pxa2x0reg.h:1.21 Sat May 15 12:17:34 2010 +++ src/sys/arch/arm/xscale/pxa2x0reg.h Sat Jun 18 13:52:24 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pxa2x0reg.h,v 1.21 2010/05/15 12:17:34 kiyohara Exp $ */ +/* $NetBSD: pxa2x0reg.h,v 1.22 2011/06/18 13:52:24 nonaka Exp $ */ /* * Copyright (c) 2002 Genetec Corporation. All rights reserved. @@ -240,12 +240,27 @@ #define ICR_MA (14) #define ICR_SCLE (15) /* PXA270? */ #define ICR_IUE (16) /* PXA270? */ +#define ICR_GCD (17) /* PXA270? */ +#define ICR_ITEIE (18) /* PXA270? */ +#define ICR_DRFIE (19) /* PXA270? */ +#define ICR_BEIE (110) /* PXA270? */ +#define ICR_SSDIE (111) /* PXA270? */ +#define ICR_ALDIE (112) /* PXA270? */ +#define ICR_SADIE (113) /* PXA270? */ #define ICR_UR (114) /* PXA270? */ #define ICR_FM (115) /* PXA270? */ #define I2C_ISR 0x1698 /* Status register */ +#define ISR_RWM (10) #define ISR_ACKNAK (11) +#define ISR_UE (12) +#define ISR_IBB (13) +#define ISR_SSD (14) +#define ISR_ALD (15) #define ISR_ITE (16) #define ISR_IRF (17) +#define ISR_GCAD (18) +#define ISR_SAD (19) +#define ISR_BED (110) #define I2C_ISAR 0x16a0 /* Slave address */ /* Clock Manager */
CVS commit: src/distrib
Module Name:src Committed By: joerg Date: Sat Jun 18 14:47:36 UTC 2011 Modified Files: src/distrib/amd64/cdroms: Makefile.cdrom src/distrib/i386/cdroms: Makefile.cdrom Log Message: Include libgcc_s.so symlinks in /usr/lib, so that binaries in /usr linked against it actually work. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/distrib/amd64/cdroms/Makefile.cdrom cvs rdiff -u -r1.24 -r1.25 src/distrib/i386/cdroms/Makefile.cdrom Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/amd64/cdroms/Makefile.cdrom diff -u src/distrib/amd64/cdroms/Makefile.cdrom:1.4 src/distrib/amd64/cdroms/Makefile.cdrom:1.5 --- src/distrib/amd64/cdroms/Makefile.cdrom:1.4 Sun Apr 17 12:18:19 2011 +++ src/distrib/amd64/cdroms/Makefile.cdrom Sat Jun 18 14:47:36 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.cdrom,v 1.4 2011/04/17 12:18:19 martin Exp $ +# $NetBSD: Makefile.cdrom,v 1.5 2011/06/18 14:47:36 joerg Exp $ .include bsd.own.mk @@ -40,6 +40,7 @@ CDRUNTIME+= ./usr/lib/libc.so* CDRUNTIME+= ./usr/lib/libcurses.so* CDRUNTIME+= ./usr/lib/libedit.so* +CDRUNTIME+= ./usr/lib/libgcc_s.so* CDRUNTIME+= ./usr/lib/libintl.so* CDRUNTIME+= ./usr/lib/libkvm.so* CDRUNTIME+= ./usr/lib/libterminfo.so* Index: src/distrib/i386/cdroms/Makefile.cdrom diff -u src/distrib/i386/cdroms/Makefile.cdrom:1.24 src/distrib/i386/cdroms/Makefile.cdrom:1.25 --- src/distrib/i386/cdroms/Makefile.cdrom:1.24 Sun Apr 17 12:18:20 2011 +++ src/distrib/i386/cdroms/Makefile.cdrom Sat Jun 18 14:47:36 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.cdrom,v 1.24 2011/04/17 12:18:20 martin Exp $ +# $NetBSD: Makefile.cdrom,v 1.25 2011/06/18 14:47:36 joerg Exp $ .include bsd.own.mk @@ -40,6 +40,7 @@ CDRUNTIME+= ./usr/lib/libc.so* CDRUNTIME+= ./usr/lib/libcurses.so* CDRUNTIME+= ./usr/lib/libedit.so* +CDRUNTIME+= ./usr/lib/libgcc_s.so* CDRUNTIME+= ./usr/lib/libintl.so* CDRUNTIME+= ./usr/lib/libkvm.so* CDRUNTIME+= ./usr/lib/libterminfo.so*
CVS commit: [netbsd-5] src
Module Name:src Committed By: bouyer Date: Sat Jun 18 16:17:39 UTC 2011 Modified Files: src/lib/libpuffs [netbsd-5]: puffs.c src/sys/fs/puffs [netbsd-5]: puffs_vnops.c Log Message: Pull up following revision(s) (requested by manu in ticket #1623): lib/libpuffs/puffs.c: revision 1.116 via patch sys/fs/puffs/puffs_vnops.c: revision 1.151 via patch Call advlock method if supplied To generate a diff of this commit: cvs rdiff -u -r1.92.4.4 -r1.92.4.5 src/lib/libpuffs/puffs.c cvs rdiff -u -r1.129.4.7 -r1.129.4.8 src/sys/fs/puffs/puffs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libpuffs/puffs.c diff -u src/lib/libpuffs/puffs.c:1.92.4.4 src/lib/libpuffs/puffs.c:1.92.4.5 --- src/lib/libpuffs/puffs.c:1.92.4.4 Tue Oct 27 20:37:38 2009 +++ src/lib/libpuffs/puffs.c Sat Jun 18 16:17:38 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: puffs.c,v 1.92.4.4 2009/10/27 20:37:38 bouyer Exp $ */ +/* $NetBSD: puffs.c,v 1.92.4.5 2011/06/18 16:17:38 bouyer Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved. @@ -31,7 +31,7 @@ #include sys/cdefs.h #if !defined(lint) -__RCSID($NetBSD: puffs.c,v 1.92.4.4 2009/10/27 20:37:38 bouyer Exp $); +__RCSID($NetBSD: puffs.c,v 1.92.4.5 2011/06/18 16:17:38 bouyer Exp $); #endif /* !lint */ #include sys/param.h @@ -99,6 +99,7 @@ FILLOP(print,PRINT); FILLOP(read, READ); FILLOP(write,WRITE); + FILLOP(advlock, ADVLOCK); FILLOP(abortop, ABORTOP); } #undef FILLOP Index: src/sys/fs/puffs/puffs_vnops.c diff -u src/sys/fs/puffs/puffs_vnops.c:1.129.4.7 src/sys/fs/puffs/puffs_vnops.c:1.129.4.8 --- src/sys/fs/puffs/puffs_vnops.c:1.129.4.7 Sat Jan 16 17:52:13 2010 +++ src/sys/fs/puffs/puffs_vnops.c Sat Jun 18 16:17:38 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: puffs_vnops.c,v 1.129.4.7 2010/01/16 17:52:13 bouyer Exp $ */ +/* $NetBSD: puffs_vnops.c,v 1.129.4.8 2011/06/18 16:17:38 bouyer Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: puffs_vnops.c,v 1.129.4.7 2010/01/16 17:52:13 bouyer Exp $); +__KERNEL_RCSID(0, $NetBSD: puffs_vnops.c,v 1.129.4.8 2011/06/18 16:17:38 bouyer Exp $); #include sys/param.h #include sys/fstrans.h @@ -39,6 +39,7 @@ #include sys/namei.h #include sys/vnode.h #include sys/proc.h +#include sys/lockf.h #include uvm/uvm.h @@ -2124,24 +2125,25 @@ } */ *ap = v; PUFFS_MSG_VARS(vn, advlock); struct vnode *vp = ap-a_vp; + struct puffs_node *pn = VPTOPP(vp); struct puffs_mount *pmp = MPTOPUFFSMP(vp-v_mount); int error; + if (!EXISTSOP(pmp, ADVLOCK)) + return lf_advlock(ap, pn-pn_lockf, vp-v_size); + PUFFS_MSG_ALLOC(vn, advlock); - error = copyin(ap-a_fl, advlock_msg-pvnr_fl, sizeof(struct flock)); - if (error) - goto out; + (void)memcpy(advlock_msg-pvnr_fl, ap-a_fl, + sizeof(advlock_msg-pvnr_fl)); advlock_msg-pvnr_id = ap-a_id; advlock_msg-pvnr_op = ap-a_op; advlock_msg-pvnr_flags = ap-a_flags; puffs_msg_setinfo(park_advlock, PUFFSOP_VN, PUFFS_VN_ADVLOCK, VPTOPNC(vp)); - PUFFS_MSG_ENQUEUEWAIT2(pmp, park_advlock, vp-v_data, NULL, error); error = checkerr(pmp, error, __func__); - - out: PUFFS_MSG_RELEASE(advlock); + return error; }
CVS commit: [netbsd-5] src/sys/fs/puffs
Module Name:src Committed By: bouyer Date: Sat Jun 18 16:19:39 UTC 2011 Modified Files: src/sys/fs/puffs [netbsd-5]: puffs_sys.h Log Message: Pull up following revision(s) (requested by manu in ticket #1623): lib/libpuffs/puffs.c: revision 1.116 sys/fs/puffs/puffs_vnops.c: revision 1.151 Call advlock method if supplied To generate a diff of this commit: cvs rdiff -u -r1.70.20.1 -r1.70.20.2 src/sys/fs/puffs/puffs_sys.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/fs/puffs/puffs_sys.h diff -u src/sys/fs/puffs/puffs_sys.h:1.70.20.1 src/sys/fs/puffs/puffs_sys.h:1.70.20.2 --- src/sys/fs/puffs/puffs_sys.h:1.70.20.1 Sat Jan 9 01:22:57 2010 +++ src/sys/fs/puffs/puffs_sys.h Sat Jun 18 16:19:39 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: puffs_sys.h,v 1.70.20.1 2010/01/09 01:22:57 snj Exp $ */ +/* $NetBSD: puffs_sys.h,v 1.70.20.2 2011/06/18 16:19:39 bouyer Exp $ */ /* * Copyright (c) 2005, 2006 Antti Kantee. All Rights Reserved. @@ -203,6 +203,7 @@ u_quad_t pn_mc_size; voff_t pn_serversize; + struct lockf * pn_lockf; LIST_ENTRY(puffs_node) pn_hashent; };
CVS commit: [netbsd-5] src/sys/ufs/ufs
Module Name:src Committed By: bouyer Date: Sat Jun 18 16:22:31 UTC 2011 Modified Files: src/sys/ufs/ufs [netbsd-5]: ufs_extattr.c Log Message: Pull up following revision(s) (requested by manu in ticket #1624): sys/ufs/ufs/ufs_extattr.c: revision 1.29 via patch Fix filesystem root leaked lock when using UFS_EXTATTR_AUTOSTART. This way, statvfs(2) calls obtained by df(1) or umount(8) will no longer sleep forever in the kernel to acquire the lock. To generate a diff of this commit: cvs rdiff -u -r1.21.14.1 -r1.21.14.2 src/sys/ufs/ufs/ufs_extattr.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/ufs/ufs/ufs_extattr.c diff -u src/sys/ufs/ufs/ufs_extattr.c:1.21.14.1 src/sys/ufs/ufs/ufs_extattr.c:1.21.14.2 --- src/sys/ufs/ufs/ufs_extattr.c:1.21.14.1 Fri May 20 19:30:09 2011 +++ src/sys/ufs/ufs/ufs_extattr.c Sat Jun 18 16:22:31 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ufs_extattr.c,v 1.21.14.1 2011/05/20 19:30:09 bouyer Exp $ */ +/* $NetBSD: ufs_extattr.c,v 1.21.14.2 2011/06/18 16:22:31 bouyer Exp $ */ /*- * Copyright (c) 1999-2002 Robert N. M. Watson @@ -48,7 +48,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ufs_extattr.c,v 1.21.14.1 2011/05/20 19:30:09 bouyer Exp $); +__KERNEL_RCSID(0, $NetBSD: ufs_extattr.c,v 1.21.14.2 2011/06/18 16:22:31 bouyer Exp $); #include opt_ffs.h @@ -284,7 +284,8 @@ error = ufs_lookup(vargs); PNBUF_PUT(cnp.cn_pnbuf); if (error) { - VOP_UNLOCK(start_dvp, 0); + if (lockparent == 0) + VOP_UNLOCK(start_dvp, 0); return (error); } #if 0 @@ -292,6 +293,10 @@ panic(ufs_extattr_lookup: target_vp == start_dvp); #endif + if ((target_vp != start_dvp) (lockparent == 0)) + VOP_UNLOCK(start_dvp, 0); + + KASSERT(VOP_ISLOCKED(target_vp) == LK_EXCLUSIVE); *vp = target_vp; return (0);
CVS commit: [netbsd-5] src/sys/dev/isa
Module Name:src Committed By: bouyer Date: Sat Jun 18 16:24:10 UTC 2011 Modified Files: src/sys/dev/isa [netbsd-5]: pcppi.c pcppivar.h Log Message: Pull up following revision(s) (requested by mrg in ticket #1625): sys/dev/isa/pcppivar.h: revision 1.10 sys/dev/isa/pcppi.c: revision 1.36 convert a lockless + spltty() combo to a IPL_VM mutex and cv. hopefully this will avoid the beep-didn't-stop problem i had recently that i was able to fix by calling wakeup() on pcppi's softc from ddb. To generate a diff of this commit: cvs rdiff -u -r1.32.14.1 -r1.32.14.2 src/sys/dev/isa/pcppi.c cvs rdiff -u -r1.9 -r1.9.14.1 src/sys/dev/isa/pcppivar.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/isa/pcppi.c diff -u src/sys/dev/isa/pcppi.c:1.32.14.1 src/sys/dev/isa/pcppi.c:1.32.14.2 --- src/sys/dev/isa/pcppi.c:1.32.14.1 Sat Nov 20 17:41:27 2010 +++ src/sys/dev/isa/pcppi.c Sat Jun 18 16:24:10 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pcppi.c,v 1.32.14.1 2010/11/20 17:41:27 riz Exp $ */ +/* $NetBSD: pcppi.c,v 1.32.14.2 2011/06/18 16:24:10 bouyer Exp $ */ /* * Copyright (c) 1996 Carnegie-Mellon University. @@ -28,7 +28,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pcppi.c,v 1.32.14.1 2010/11/20 17:41:27 riz Exp $); +__KERNEL_RCSID(0, $NetBSD: pcppi.c,v 1.32.14.2 2011/06/18 16:24:10 bouyer Exp $); #include attimer.h @@ -39,8 +39,9 @@ #include sys/proc.h #include sys/device.h #include sys/errno.h - #include sys/bus.h +#include sys/mutex.h +#include sys/condvar.h #include dev/ic/attimervar.h @@ -193,6 +194,10 @@ callout_stop(sc-sc_bell_ch); callout_destroy(sc-sc_bell_ch); bus_space_unmap(sc-sc_iot, sc-sc_ppi_ioh, sc-sc_size); + + mutex_destroy(sc-sc_lock); + cv_destroy(sc-sc_stop_cv); + return 0; } @@ -206,6 +211,9 @@ sc-sc_bellactive = sc-sc_bellpitch = sc-sc_slp = 0; + mutex_init(sc-sc_lock, MUTEX_DEFAULT, IPL_VM); + cv_init(sc-sc_stop_cv, bell); + #if NPCKBD 0 /* Provide a beeper for the PC Keyboard, if there isn't one already. */ pckbd_hookup_bell(pcppi_pckbd_bell, sc); @@ -251,21 +259,20 @@ pcppi_bell(pcppi_tag_t self, int pitch, int period, int slp) { struct pcppi_softc *sc = self; - int s; - s = spltty(); /* ??? */ + mutex_enter(sc-sc_lock); if (sc-sc_bellactive) { if (sc-sc_timeout) { sc-sc_timeout = 0; callout_stop(sc-sc_bell_ch); } if (sc-sc_slp) - wakeup(pcppi_bell_stop); + cv_broadcast(sc-sc_stop_cv); } if (pitch == 0 || period == 0) { pcppi_bell_stop(sc); sc-sc_bellpitch = 0; - splx(s); + mutex_exit(sc-sc_lock); return; } if (!sc-sc_bellactive || sc-sc_bellpitch != pitch) { @@ -289,20 +296,19 @@ callout_reset(sc-sc_bell_ch, period, pcppi_bell_stop, sc); if (slp PCPPI_BELL_SLEEP) { sc-sc_slp = 1; - tsleep(pcppi_bell_stop, PCPPIPRI | PCATCH, bell, 0); + cv_wait_sig(sc-sc_stop_cv, sc-sc_lock); sc-sc_slp = 0; } } - splx(s); + mutex_exit(sc-sc_lock); } static void pcppi_bell_stop(void *arg) { struct pcppi_softc *sc = arg; - int s; - s = spltty(); /* ??? */ + mutex_enter(sc-sc_lock); sc-sc_timeout = 0; /* disable bell */ @@ -311,8 +317,8 @@ ~PIT_SPKR); sc-sc_bellactive = 0; if (sc-sc_slp) - wakeup(pcppi_bell_stop); - splx(s); + cv_broadcast(sc-sc_stop_cv); + mutex_exit(sc-sc_lock); } #if NPCKBD 0 Index: src/sys/dev/isa/pcppivar.h diff -u src/sys/dev/isa/pcppivar.h:1.9 src/sys/dev/isa/pcppivar.h:1.9.14.1 --- src/sys/dev/isa/pcppivar.h:1.9 Tue Mar 4 16:35:19 2008 +++ src/sys/dev/isa/pcppivar.h Sat Jun 18 16:24:10 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pcppivar.h,v 1.9 2008/03/04 16:35:19 cube Exp $ */ +/* $NetBSD: pcppivar.h,v 1.9.14.1 2011/06/18 16:24:10 bouyer Exp $ */ /* * Copyright (c) 1996 Carnegie-Mellon University. @@ -37,18 +37,21 @@ }; struct pcppi_softc { -device_t sc_dv; + device_t sc_dv; -bus_space_tag_t sc_iot; -bus_space_handle_t sc_ppi_ioh; -bus_size_t sc_size; -device_t sc_timer; + bus_space_tag_t sc_iot; + bus_space_handle_t sc_ppi_ioh; + bus_size_t sc_size; + device_t sc_timer; -struct callout sc_bell_ch; + struct callout sc_bell_ch; -int sc_bellactive, sc_bellpitch; -int sc_slp; -int sc_timeout; + int sc_bellactive, sc_bellpitch; + int sc_slp; + int sc_timeout; + + kmutex_t sc_lock; + kcondvar_t sc_stop_cv; }; void pcppi_attach(struct pcppi_softc *);
CVS commit: [netbsd-5] src/sys/arch/m68k/fpe
Module Name:src Committed By: bouyer Date: Sat Jun 18 16:26:58 UTC 2011 Modified Files: src/sys/arch/m68k/fpe [netbsd-5]: fpu_emulate.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1626): sys/arch/m68k/fpe/fpu_emulate.c: revision 1.31 Fix botch in rev 1.28 that causes wrong results of fcmp and ftst in FPE. fpu_upd_fpsr() should be called even in discard_result case if an emulated instruction gets proper result without signal. Fixes weird behavior of awk(1) seen on /etc/rc.d/postfix on XM6i and TME emulating sun3 without 68881. Should be pulled up to all netbsd-4 and netbsd-5 branches. To generate a diff of this commit: cvs rdiff -u -r1.27.54.1 -r1.27.54.2 src/sys/arch/m68k/fpe/fpu_emulate.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/m68k/fpe/fpu_emulate.c diff -u src/sys/arch/m68k/fpe/fpu_emulate.c:1.27.54.1 src/sys/arch/m68k/fpe/fpu_emulate.c:1.27.54.2 --- src/sys/arch/m68k/fpe/fpu_emulate.c:1.27.54.1 Mon Jan 26 00:24:55 2009 +++ src/sys/arch/m68k/fpe/fpu_emulate.c Sat Jun 18 16:26:58 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: fpu_emulate.c,v 1.27.54.1 2009/01/26 00:24:55 snj Exp $ */ +/* $NetBSD: fpu_emulate.c,v 1.27.54.2 2011/06/18 16:26:58 bouyer Exp $ */ /* * Copyright (c) 1995 Gordon W. Ross @@ -37,7 +37,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: fpu_emulate.c,v 1.27.54.1 2009/01/26 00:24:55 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: fpu_emulate.c,v 1.27.54.2 2011/06/18 16:26:58 bouyer Exp $); #include sys/param.h #include sys/types.h @@ -922,27 +922,34 @@ if (res == NULL) sig = SIGILL; -if (!discard_result sig == 0) { - fpu_implode(fe, res, FTYPE_EXT, fpregs[regnum * 3]); +if (sig == 0) { + if (!discard_result) + fpu_implode(fe, res, FTYPE_EXT, fpregs[regnum * 3]); /* update fpsr according to the result of operation */ fpu_upd_fpsr(fe, res); #if DEBUG_FPE - printf(fpu_emul_arith: %08x,%08x,%08x stored in FP%d\n, - fpregs[regnum*3], fpregs[regnum*3+1], - fpregs[regnum*3+2], regnum); -} else if (sig == 0) { - static const char *class_name[] = - { SNAN, QNAN, ZERO, NUM, INF }; - printf(fpu_emul_arith: result(%s,%c,%d,%08x,%08x,%08x) discarded\n, - class_name[res-fp_class + 2], - res-fp_sign ? '-' : '+', res-fp_exp, - res-fp_mant[0], res-fp_mant[1], - res-fp_mant[2]); -} else { - printf(fpu_emul_arith: received signal %d\n, sig); + if (!discard_result) { + printf(fpu_emul_arith: %08x,%08x,%08x stored in FP%d\n, + fpregs[regnum*3], fpregs[regnum*3+1], + fpregs[regnum*3+2], regnum); + } else { + static const char *class_name[] = + { SNAN, QNAN, ZERO, NUM, INF }; + printf(fpu_emul_arith: result(%s,%c,%d,%08x,%08x,%08x) + discarded\n, + class_name[res-fp_class + 2], + res-fp_sign ? '-' : '+', res-fp_exp, + res-fp_mant[0], res-fp_mant[1], + res-fp_mant[2]); + } #endif } +#if DEBUG_FPE +else { + printf(fpu_emul_arith: received signal %d\n, sig); +} +#endif #if DEBUG_FPE printf(fpu_emul_arith: FPSR = %08x, FPCR = %08x\n,
CVS commit: [netbsd-5-1] src/sys/arch/m68k/fpe
Module Name:src Committed By: bouyer Date: Sat Jun 18 16:27:11 UTC 2011 Modified Files: src/sys/arch/m68k/fpe [netbsd-5-1]: fpu_emulate.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1626): sys/arch/m68k/fpe/fpu_emulate.c: revision 1.31 Fix botch in rev 1.28 that causes wrong results of fcmp and ftst in FPE. fpu_upd_fpsr() should be called even in discard_result case if an emulated instruction gets proper result without signal. Fixes weird behavior of awk(1) seen on /etc/rc.d/postfix on XM6i and TME emulating sun3 without 68881. Should be pulled up to all netbsd-4 and netbsd-5 branches. To generate a diff of this commit: cvs rdiff -u -r1.27.54.1 -r1.27.54.1.6.1 src/sys/arch/m68k/fpe/fpu_emulate.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/m68k/fpe/fpu_emulate.c diff -u src/sys/arch/m68k/fpe/fpu_emulate.c:1.27.54.1 src/sys/arch/m68k/fpe/fpu_emulate.c:1.27.54.1.6.1 --- src/sys/arch/m68k/fpe/fpu_emulate.c:1.27.54.1 Mon Jan 26 00:24:55 2009 +++ src/sys/arch/m68k/fpe/fpu_emulate.c Sat Jun 18 16:27:11 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: fpu_emulate.c,v 1.27.54.1 2009/01/26 00:24:55 snj Exp $ */ +/* $NetBSD: fpu_emulate.c,v 1.27.54.1.6.1 2011/06/18 16:27:11 bouyer Exp $ */ /* * Copyright (c) 1995 Gordon W. Ross @@ -37,7 +37,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: fpu_emulate.c,v 1.27.54.1 2009/01/26 00:24:55 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: fpu_emulate.c,v 1.27.54.1.6.1 2011/06/18 16:27:11 bouyer Exp $); #include sys/param.h #include sys/types.h @@ -922,27 +922,34 @@ if (res == NULL) sig = SIGILL; -if (!discard_result sig == 0) { - fpu_implode(fe, res, FTYPE_EXT, fpregs[regnum * 3]); +if (sig == 0) { + if (!discard_result) + fpu_implode(fe, res, FTYPE_EXT, fpregs[regnum * 3]); /* update fpsr according to the result of operation */ fpu_upd_fpsr(fe, res); #if DEBUG_FPE - printf(fpu_emul_arith: %08x,%08x,%08x stored in FP%d\n, - fpregs[regnum*3], fpregs[regnum*3+1], - fpregs[regnum*3+2], regnum); -} else if (sig == 0) { - static const char *class_name[] = - { SNAN, QNAN, ZERO, NUM, INF }; - printf(fpu_emul_arith: result(%s,%c,%d,%08x,%08x,%08x) discarded\n, - class_name[res-fp_class + 2], - res-fp_sign ? '-' : '+', res-fp_exp, - res-fp_mant[0], res-fp_mant[1], - res-fp_mant[2]); -} else { - printf(fpu_emul_arith: received signal %d\n, sig); + if (!discard_result) { + printf(fpu_emul_arith: %08x,%08x,%08x stored in FP%d\n, + fpregs[regnum*3], fpregs[regnum*3+1], + fpregs[regnum*3+2], regnum); + } else { + static const char *class_name[] = + { SNAN, QNAN, ZERO, NUM, INF }; + printf(fpu_emul_arith: result(%s,%c,%d,%08x,%08x,%08x) + discarded\n, + class_name[res-fp_class + 2], + res-fp_sign ? '-' : '+', res-fp_exp, + res-fp_mant[0], res-fp_mant[1], + res-fp_mant[2]); + } #endif } +#if DEBUG_FPE +else { + printf(fpu_emul_arith: received signal %d\n, sig); +} +#endif #if DEBUG_FPE printf(fpu_emul_arith: FPSR = %08x, FPCR = %08x\n,
CVS commit: [netbsd-5-0] src/sys/arch/m68k/fpe
Module Name:src Committed By: bouyer Date: Sat Jun 18 16:27:16 UTC 2011 Modified Files: src/sys/arch/m68k/fpe [netbsd-5-0]: fpu_emulate.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1626): sys/arch/m68k/fpe/fpu_emulate.c: revision 1.31 Fix botch in rev 1.28 that causes wrong results of fcmp and ftst in FPE. fpu_upd_fpsr() should be called even in discard_result case if an emulated instruction gets proper result without signal. Fixes weird behavior of awk(1) seen on /etc/rc.d/postfix on XM6i and TME emulating sun3 without 68881. Should be pulled up to all netbsd-4 and netbsd-5 branches. To generate a diff of this commit: cvs rdiff -u -r1.27.54.1 -r1.27.54.1.2.1 src/sys/arch/m68k/fpe/fpu_emulate.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/m68k/fpe/fpu_emulate.c diff -u src/sys/arch/m68k/fpe/fpu_emulate.c:1.27.54.1 src/sys/arch/m68k/fpe/fpu_emulate.c:1.27.54.1.2.1 --- src/sys/arch/m68k/fpe/fpu_emulate.c:1.27.54.1 Mon Jan 26 00:24:55 2009 +++ src/sys/arch/m68k/fpe/fpu_emulate.c Sat Jun 18 16:27:16 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: fpu_emulate.c,v 1.27.54.1 2009/01/26 00:24:55 snj Exp $ */ +/* $NetBSD: fpu_emulate.c,v 1.27.54.1.2.1 2011/06/18 16:27:16 bouyer Exp $ */ /* * Copyright (c) 1995 Gordon W. Ross @@ -37,7 +37,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: fpu_emulate.c,v 1.27.54.1 2009/01/26 00:24:55 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: fpu_emulate.c,v 1.27.54.1.2.1 2011/06/18 16:27:16 bouyer Exp $); #include sys/param.h #include sys/types.h @@ -922,27 +922,34 @@ if (res == NULL) sig = SIGILL; -if (!discard_result sig == 0) { - fpu_implode(fe, res, FTYPE_EXT, fpregs[regnum * 3]); +if (sig == 0) { + if (!discard_result) + fpu_implode(fe, res, FTYPE_EXT, fpregs[regnum * 3]); /* update fpsr according to the result of operation */ fpu_upd_fpsr(fe, res); #if DEBUG_FPE - printf(fpu_emul_arith: %08x,%08x,%08x stored in FP%d\n, - fpregs[regnum*3], fpregs[regnum*3+1], - fpregs[regnum*3+2], regnum); -} else if (sig == 0) { - static const char *class_name[] = - { SNAN, QNAN, ZERO, NUM, INF }; - printf(fpu_emul_arith: result(%s,%c,%d,%08x,%08x,%08x) discarded\n, - class_name[res-fp_class + 2], - res-fp_sign ? '-' : '+', res-fp_exp, - res-fp_mant[0], res-fp_mant[1], - res-fp_mant[2]); -} else { - printf(fpu_emul_arith: received signal %d\n, sig); + if (!discard_result) { + printf(fpu_emul_arith: %08x,%08x,%08x stored in FP%d\n, + fpregs[regnum*3], fpregs[regnum*3+1], + fpregs[regnum*3+2], regnum); + } else { + static const char *class_name[] = + { SNAN, QNAN, ZERO, NUM, INF }; + printf(fpu_emul_arith: result(%s,%c,%d,%08x,%08x,%08x) + discarded\n, + class_name[res-fp_class + 2], + res-fp_sign ? '-' : '+', res-fp_exp, + res-fp_mant[0], res-fp_mant[1], + res-fp_mant[2]); + } #endif } +#if DEBUG_FPE +else { + printf(fpu_emul_arith: received signal %d\n, sig); +} +#endif #if DEBUG_FPE printf(fpu_emul_arith: FPSR = %08x, FPCR = %08x\n,
CVS commit: [netbsd-5] src/sys/kern
Module Name:src Committed By: bouyer Date: Sat Jun 18 16:35:51 UTC 2011 Modified Files: src/sys/kern [netbsd-5]: kern_fork.c Log Message: Pull up following revision(s) (requested by rmind in ticket #1629): sys/kern/kern_fork.c: revision 1.181 Inherit proc_t::p_mqueue_cnt on fork(). To generate a diff of this commit: cvs rdiff -u -r1.171 -r1.171.4.1 src/sys/kern/kern_fork.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_fork.c diff -u src/sys/kern/kern_fork.c:1.171 src/sys/kern/kern_fork.c:1.171.4.1 --- src/sys/kern/kern_fork.c:1.171 Sat Oct 11 13:40:57 2008 +++ src/sys/kern/kern_fork.c Sat Jun 18 16:35:51 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_fork.c,v 1.171 2008/10/11 13:40:57 pooka Exp $ */ +/* $NetBSD: kern_fork.c,v 1.171.4.1 2011/06/18 16:35:51 bouyer Exp $ */ /*- * Copyright (c) 1999, 2001, 2004, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_fork.c,v 1.171 2008/10/11 13:40:57 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_fork.c,v 1.171.4.1 2011/06/18 16:35:51 bouyer Exp $); #include opt_ktrace.h @@ -343,6 +343,9 @@ else p2-p_fd = fd_copy(); + /* XXX racy */ + p2-p_mqueue_cnt = p1-p_mqueue_cnt; + if (flags FORK_SHARECWD) cwdshare(p2); else
CVS commit: [netbsd-5-1] src/sys/kern
Module Name:src Committed By: bouyer Date: Sat Jun 18 16:35:56 UTC 2011 Modified Files: src/sys/kern [netbsd-5-1]: kern_fork.c Log Message: Pull up following revision(s) (requested by rmind in ticket #1629): sys/kern/kern_fork.c: revision 1.181 Inherit proc_t::p_mqueue_cnt on fork(). To generate a diff of this commit: cvs rdiff -u -r1.171 -r1.171.12.1 src/sys/kern/kern_fork.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_fork.c diff -u src/sys/kern/kern_fork.c:1.171 src/sys/kern/kern_fork.c:1.171.12.1 --- src/sys/kern/kern_fork.c:1.171 Sat Oct 11 13:40:57 2008 +++ src/sys/kern/kern_fork.c Sat Jun 18 16:35:56 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_fork.c,v 1.171 2008/10/11 13:40:57 pooka Exp $ */ +/* $NetBSD: kern_fork.c,v 1.171.12.1 2011/06/18 16:35:56 bouyer Exp $ */ /*- * Copyright (c) 1999, 2001, 2004, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_fork.c,v 1.171 2008/10/11 13:40:57 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_fork.c,v 1.171.12.1 2011/06/18 16:35:56 bouyer Exp $); #include opt_ktrace.h @@ -343,6 +343,9 @@ else p2-p_fd = fd_copy(); + /* XXX racy */ + p2-p_mqueue_cnt = p1-p_mqueue_cnt; + if (flags FORK_SHARECWD) cwdshare(p2); else
CVS commit: [netbsd-5-0] src/sys/kern
Module Name:src Committed By: bouyer Date: Sat Jun 18 16:36:09 UTC 2011 Modified Files: src/sys/kern [netbsd-5-0]: kern_fork.c Log Message: Pull up following revision(s) (requested by rmind in ticket #1629): sys/kern/kern_fork.c: revision 1.181 Inherit proc_t::p_mqueue_cnt on fork(). To generate a diff of this commit: cvs rdiff -u -r1.171 -r1.171.8.1 src/sys/kern/kern_fork.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_fork.c diff -u src/sys/kern/kern_fork.c:1.171 src/sys/kern/kern_fork.c:1.171.8.1 --- src/sys/kern/kern_fork.c:1.171 Sat Oct 11 13:40:57 2008 +++ src/sys/kern/kern_fork.c Sat Jun 18 16:36:09 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_fork.c,v 1.171 2008/10/11 13:40:57 pooka Exp $ */ +/* $NetBSD: kern_fork.c,v 1.171.8.1 2011/06/18 16:36:09 bouyer Exp $ */ /*- * Copyright (c) 1999, 2001, 2004, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_fork.c,v 1.171 2008/10/11 13:40:57 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_fork.c,v 1.171.8.1 2011/06/18 16:36:09 bouyer Exp $); #include opt_ktrace.h @@ -343,6 +343,9 @@ else p2-p_fd = fd_copy(); + /* XXX racy */ + p2-p_mqueue_cnt = p1-p_mqueue_cnt; + if (flags FORK_SHARECWD) cwdshare(p2); else
CVS commit: [netbsd-5-1] src/sys/arch/xen/xen
Module Name:src Committed By: bouyer Date: Sat Jun 18 16:39:10 UTC 2011 Modified Files: src/sys/arch/xen/xen [netbsd-5-1]: xbdback_xenbus.c Log Message: Pull up following revision(s) (requested by jym in ticket #1630): sys/arch/xen/xen/xbdback_xenbus.c: revision 1.37 In xbdback(4), move the code that copies segments after the bound checks of the ``nr_segments'' variable. In cases where we are running domUs with an architecture different from the dom0 one (for example: 32 bits domUs on 64 bits dom0), copying segments with an invalid nr_segments value will lead to the corruption of the xbdback instance structure and quickly crash the dom0 backend. Tested under 64 bits dom0 with 32 bits domUs. No regression observed. ok bouyer@. Will be pulled up to -4 and -5. To generate a diff of this commit: cvs rdiff -u -r1.20.4.3.2.1 -r1.20.4.3.2.2 \ src/sys/arch/xen/xen/xbdback_xenbus.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/xen/xen/xbdback_xenbus.c diff -u src/sys/arch/xen/xen/xbdback_xenbus.c:1.20.4.3.2.1 src/sys/arch/xen/xen/xbdback_xenbus.c:1.20.4.3.2.2 --- src/sys/arch/xen/xen/xbdback_xenbus.c:1.20.4.3.2.1 Mon Mar 7 04:19:42 2011 +++ src/sys/arch/xen/xen/xbdback_xenbus.c Sat Jun 18 16:39:10 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: xbdback_xenbus.c,v 1.20.4.3.2.1 2011/03/07 04:19:42 riz Exp $ */ +/* $NetBSD: xbdback_xenbus.c,v 1.20.4.3.2.2 2011/06/18 16:39:10 bouyer Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: xbdback_xenbus.c,v 1.20.4.3.2.1 2011/03/07 04:19:42 riz Exp $); +__KERNEL_RCSID(0, $NetBSD: xbdback_xenbus.c,v 1.20.4.3.2.2 2011/06/18 16:39:10 bouyer Exp $); #include sys/types.h #include sys/param.h @@ -869,7 +869,6 @@ blkif_request_t *req = xbdi-xbdi_xen_req; blkif_x86_32_request_t *req32; blkif_x86_64_request_t *req64; - int i; (void)obj; if (xbdi-xbdi_ring.ring_n.req_cons != xbdi-xbdi_req_prod) { @@ -887,8 +886,6 @@ req-handle = req32-handle; req-id = req32-id; req-sector_number = req32-sector_number; - for (i = 0; i req-nr_segments; i++) -req-seg[i] = req32-seg[i]; break; case XBDIP_64: @@ -899,8 +896,6 @@ req-handle = req64-handle; req-id = req64-id; req-sector_number = req64-sector_number; - for (i = 0; i req-nr_segments; i++) -req-seg[i] = req64-seg[i]; break; } XENPRINTF((xbdback op %d req_cons 0x%x req_prod 0x%x @@ -1015,16 +1010,23 @@ static void * xbdback_co_io(struct xbdback_instance *xbdi, void *obj) { - int error; + int i, error; + blkif_request_t *req; + blkif_x86_32_request_t *req32; + blkif_x86_64_request_t *req64; (void)obj; - if (xbdi-xbdi_xen_req.nr_segments 1 || - xbdi-xbdi_xen_req.nr_segments BLKIF_MAX_SEGMENTS_PER_REQUEST ) { + + /* some sanity checks */ + req = xbdi-xbdi_xen_req; + if (req-nr_segments 1 || + req-nr_segments BLKIF_MAX_SEGMENTS_PER_REQUEST) { printf(xbdback_io domain %d: %d segments\n, xbdi-xbdi_domid, xbdi-xbdi_xen_req.nr_segments); error = EINVAL; goto end; } + if (xbdi-xbdi_xen_req.operation == BLKIF_OP_WRITE) { if (xbdi-xbdi_ro) { error = EROFS; @@ -1034,6 +1036,25 @@ xbdi-xbdi_segno = 0; + /* copy request segments */ + switch(xbdi-xbdi_proto) { + case XBDIP_NATIVE: + /* already copied in xbdback_co_main_loop */ + break; + case XBDIP_32: + req32 = RING_GET_REQUEST(xbdi-xbdi_ring.ring_32, + xbdi-xbdi_ring.ring_n.req_cons); + for (i = 0; i req-nr_segments; i++) + req-seg[i] = req32-seg[i]; + break; + case XBDIP_64: + req64 = RING_GET_REQUEST(xbdi-xbdi_ring.ring_64, + xbdi-xbdi_ring.ring_n.req_cons); + for (i = 0; i req-nr_segments; i++) + req-seg[i] = req64-seg[i]; + break; + } + xbdi-xbdi_cont = xbdback_co_io_gotreq; return xbdback_pool_get(xbdback_request_pool, xbdi); end:
CVS commit: [netbsd-5] src/sys/dev/ic
Module Name:src Committed By: bouyer Date: Sat Jun 18 16:40:31 UTC 2011 Modified Files: src/sys/dev/ic [netbsd-5]: gem.c Log Message: Pull up following revision(s) (requested by jdc in ticket #1632): sys/dev/ic/gem.c: revision 1.97 Fix corrupted packet problem on 100Mb/s half duplex links. We need to set echo disable on the internal phy too, not just on the external phy. Tested on: SUNW,Sun-Blade-2000 gem0 at pci0 dev 5 function 1: Sun Microsystems ERI Ethernet (rev. 0x01) ukphy0 at gem0 phy 1: OUI 0x0006b8, model 0x000c, rev. 1 Setting pointed out by bad@. To generate a diff of this commit: cvs rdiff -u -r1.78.4.1 -r1.78.4.2 src/sys/dev/ic/gem.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/gem.c diff -u src/sys/dev/ic/gem.c:1.78.4.1 src/sys/dev/ic/gem.c:1.78.4.2 --- src/sys/dev/ic/gem.c:1.78.4.1 Fri May 1 01:56:16 2009 +++ src/sys/dev/ic/gem.c Sat Jun 18 16:40:31 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: gem.c,v 1.78.4.1 2009/05/01 01:56:16 snj Exp $ */ +/* $NetBSD: gem.c,v 1.78.4.2 2011/06/18 16:40:31 bouyer Exp $ */ /* * @@ -37,7 +37,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: gem.c,v 1.78.4.1 2009/05/01 01:56:16 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: gem.c,v 1.78.4.2 2011/06/18 16:40:31 bouyer Exp $); #include opt_inet.h #include bpfilter.h @@ -2385,14 +2385,6 @@ sc-sc_mif_config = bus_space_read_4(t, mac, GEM_MIF_CONFIG); if ((sc-sc_flags (GEM_SERDES | GEM_SERIAL)) == 0) { if ((sc-sc_mif_config GEM_MIF_CONFIG_MDI1) != 0) { - /* External MII needs echo disable if half duplex. */ - if ((IFM_OPTIONS(sc-sc_mii.mii_media_active) - IFM_FDX) != 0) -/* turn on full duplex LED */ -v |= GEM_MAC_XIF_FDPLX_LED; - else -/* half duplex -- disable echo */ -v |= GEM_MAC_XIF_ECHO_DISABL; if (gigabit) v |= GEM_MAC_XIF_GMII_MODE; else @@ -2400,6 +2392,13 @@ } else /* Internal MII needs buf enable */ v |= GEM_MAC_XIF_MII_BUF_ENA; + /* MII needs echo disable if half duplex. */ + if ((IFM_OPTIONS(sc-sc_mii.mii_media_active) IFM_FDX) != 0) + /* turn on full duplex LED */ + v |= GEM_MAC_XIF_FDPLX_LED; + else + /* half duplex -- disable echo */ + v |= GEM_MAC_XIF_ECHO_DISABL; } else { if ((IFM_OPTIONS(sc-sc_mii.mii_media_active) IFM_FDX) != 0) v |= GEM_MAC_XIF_FDPLX_LED;
CVS commit: [netbsd-5-1] src/sys/dev/ic
Module Name:src Committed By: bouyer Date: Sat Jun 18 16:40:39 UTC 2011 Modified Files: src/sys/dev/ic [netbsd-5-1]: gem.c Log Message: Pull up following revision(s) (requested by jdc in ticket #1632): sys/dev/ic/gem.c: revision 1.97 Fix corrupted packet problem on 100Mb/s half duplex links. We need to set echo disable on the internal phy too, not just on the external phy. Tested on: SUNW,Sun-Blade-2000 gem0 at pci0 dev 5 function 1: Sun Microsystems ERI Ethernet (rev. 0x01) ukphy0 at gem0 phy 1: OUI 0x0006b8, model 0x000c, rev. 1 Setting pointed out by bad@. To generate a diff of this commit: cvs rdiff -u -r1.78.4.1 -r1.78.4.1.2.1 src/sys/dev/ic/gem.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/gem.c diff -u src/sys/dev/ic/gem.c:1.78.4.1 src/sys/dev/ic/gem.c:1.78.4.1.2.1 --- src/sys/dev/ic/gem.c:1.78.4.1 Fri May 1 01:56:16 2009 +++ src/sys/dev/ic/gem.c Sat Jun 18 16:40:39 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: gem.c,v 1.78.4.1 2009/05/01 01:56:16 snj Exp $ */ +/* $NetBSD: gem.c,v 1.78.4.1.2.1 2011/06/18 16:40:39 bouyer Exp $ */ /* * @@ -37,7 +37,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: gem.c,v 1.78.4.1 2009/05/01 01:56:16 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: gem.c,v 1.78.4.1.2.1 2011/06/18 16:40:39 bouyer Exp $); #include opt_inet.h #include bpfilter.h @@ -2385,14 +2385,6 @@ sc-sc_mif_config = bus_space_read_4(t, mac, GEM_MIF_CONFIG); if ((sc-sc_flags (GEM_SERDES | GEM_SERIAL)) == 0) { if ((sc-sc_mif_config GEM_MIF_CONFIG_MDI1) != 0) { - /* External MII needs echo disable if half duplex. */ - if ((IFM_OPTIONS(sc-sc_mii.mii_media_active) - IFM_FDX) != 0) -/* turn on full duplex LED */ -v |= GEM_MAC_XIF_FDPLX_LED; - else -/* half duplex -- disable echo */ -v |= GEM_MAC_XIF_ECHO_DISABL; if (gigabit) v |= GEM_MAC_XIF_GMII_MODE; else @@ -2400,6 +2392,13 @@ } else /* Internal MII needs buf enable */ v |= GEM_MAC_XIF_MII_BUF_ENA; + /* MII needs echo disable if half duplex. */ + if ((IFM_OPTIONS(sc-sc_mii.mii_media_active) IFM_FDX) != 0) + /* turn on full duplex LED */ + v |= GEM_MAC_XIF_FDPLX_LED; + else + /* half duplex -- disable echo */ + v |= GEM_MAC_XIF_ECHO_DISABL; } else { if ((IFM_OPTIONS(sc-sc_mii.mii_media_active) IFM_FDX) != 0) v |= GEM_MAC_XIF_FDPLX_LED;
CVS commit: [netbsd-5-0] src/sys/dev/ic
Module Name:src Committed By: bouyer Date: Sat Jun 18 16:40:43 UTC 2011 Modified Files: src/sys/dev/ic [netbsd-5-0]: gem.c Log Message: Pull up following revision(s) (requested by jdc in ticket #1632): sys/dev/ic/gem.c: revision 1.97 Fix corrupted packet problem on 100Mb/s half duplex links. We need to set echo disable on the internal phy too, not just on the external phy. Tested on: SUNW,Sun-Blade-2000 gem0 at pci0 dev 5 function 1: Sun Microsystems ERI Ethernet (rev. 0x01) ukphy0 at gem0 phy 1: OUI 0x0006b8, model 0x000c, rev. 1 Setting pointed out by bad@. To generate a diff of this commit: cvs rdiff -u -r1.78 -r1.78.6.1 src/sys/dev/ic/gem.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/gem.c diff -u src/sys/dev/ic/gem.c:1.78 src/sys/dev/ic/gem.c:1.78.6.1 --- src/sys/dev/ic/gem.c:1.78 Mon Sep 15 19:50:28 2008 +++ src/sys/dev/ic/gem.c Sat Jun 18 16:40:43 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: gem.c,v 1.78 2008/09/15 19:50:28 jdc Exp $ */ +/* $NetBSD: gem.c,v 1.78.6.1 2011/06/18 16:40:43 bouyer Exp $ */ /* * @@ -37,7 +37,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: gem.c,v 1.78 2008/09/15 19:50:28 jdc Exp $); +__KERNEL_RCSID(0, $NetBSD: gem.c,v 1.78.6.1 2011/06/18 16:40:43 bouyer Exp $); #include opt_inet.h #include bpfilter.h @@ -2386,14 +2386,6 @@ sc-sc_mif_config = bus_space_read_4(t, mac, GEM_MIF_CONFIG); if ((sc-sc_flags (GEM_SERDES | GEM_SERIAL)) == 0) { if ((sc-sc_mif_config GEM_MIF_CONFIG_MDI1) != 0) { - /* External MII needs echo disable if half duplex. */ - if ((IFM_OPTIONS(sc-sc_mii.mii_media_active) - IFM_FDX) != 0) -/* turn on full duplex LED */ -v |= GEM_MAC_XIF_FDPLX_LED; - else -/* half duplex -- disable echo */ -v |= GEM_MAC_XIF_ECHO_DISABL; if (gigabit) v |= GEM_MAC_XIF_GMII_MODE; else @@ -2401,6 +2393,13 @@ } else /* Internal MII needs buf enable */ v |= GEM_MAC_XIF_MII_BUF_ENA; + /* MII needs echo disable if half duplex. */ + if ((IFM_OPTIONS(sc-sc_mii.mii_media_active) IFM_FDX) != 0) + /* turn on full duplex LED */ + v |= GEM_MAC_XIF_FDPLX_LED; + else + /* half duplex -- disable echo */ + v |= GEM_MAC_XIF_ECHO_DISABL; } else { if ((IFM_OPTIONS(sc-sc_mii.mii_media_active) IFM_FDX) != 0) v |= GEM_MAC_XIF_FDPLX_LED;
CVS commit: [netbsd-5] src/sys/kern
Module Name:src Committed By: bouyer Date: Sat Jun 18 16:42:04 UTC 2011 Modified Files: src/sys/kern [netbsd-5]: uipc_domain.c uipc_proto.c uipc_usrreq.c Log Message: Pull up following revision(s) (requested by manu in ticket #1633): sys/kern/uipc_domain.c: revision 1.86 sys/kern/uipc_usrreq.c: revision 1.134 sys/kern/uipc_proto.c: revision 1.22 Add SOCK_SEQPACKET to PL_LOCAL sockets. Based on patch from Jesse Off, submitted 8 years ago: http://mail-index.netbsd.org/tech-kern/2003/04/14/0006.html To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.76.12.1 src/sys/kern/uipc_domain.c cvs rdiff -u -r1.21 -r1.21.12.1 src/sys/kern/uipc_proto.c cvs rdiff -u -r1.119.4.3 -r1.119.4.4 src/sys/kern/uipc_usrreq.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/uipc_domain.c diff -u src/sys/kern/uipc_domain.c:1.76 src/sys/kern/uipc_domain.c:1.76.12.1 --- src/sys/kern/uipc_domain.c:1.76 Thu Apr 24 11:38:36 2008 +++ src/sys/kern/uipc_domain.c Sat Jun 18 16:42:03 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: uipc_domain.c,v 1.76 2008/04/24 11:38:36 ad Exp $ */ +/* $NetBSD: uipc_domain.c,v 1.76.12.1 2011/06/18 16:42:03 bouyer Exp $ */ /* * Copyright (c) 1982, 1986, 1993 @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uipc_domain.c,v 1.76 2008/04/24 11:38:36 ad Exp $); +__KERNEL_RCSID(0, $NetBSD: uipc_domain.c,v 1.76.12.1 2011/06/18 16:42:03 bouyer Exp $); #include sys/param.h #include sys/socket.h @@ -492,6 +492,12 @@ CTL_NET, PF_LOCAL, SOCK_STREAM, CTL_EOL); sysctl_createv(clog, 0, NULL, NULL, CTLFLAG_PERMANENT, + CTLTYPE_NODE, seqpacket, + SYSCTL_DESCR(SOCK_SEQPACKET settings), + NULL, 0, NULL, 0, + CTL_NET, PF_LOCAL, SOCK_SEQPACKET, CTL_EOL); + sysctl_createv(domain_sysctllog, 0, NULL, NULL, + CTLFLAG_PERMANENT, CTLTYPE_NODE, dgram, SYSCTL_DESCR(SOCK_DGRAM settings), NULL, 0, NULL, 0, @@ -506,6 +512,13 @@ sysctl_createv(clog, 0, NULL, NULL, CTLFLAG_PERMANENT, CTLTYPE_STRUCT, pcblist, + SYSCTL_DESCR(SOCK_SEQPACKET protocol control +block list), + sysctl_unpcblist, 0, NULL, 0, + CTL_NET, PF_LOCAL, SOCK_SEQPACKET, CTL_CREATE, CTL_EOL); + sysctl_createv(domain_sysctllog, 0, NULL, NULL, + CTLFLAG_PERMANENT, + CTLTYPE_STRUCT, pcblist, SYSCTL_DESCR(SOCK_DGRAM protocol control block list), sysctl_unpcblist, 0, NULL, 0, CTL_NET, PF_LOCAL, SOCK_DGRAM, CTL_CREATE, CTL_EOL); Index: src/sys/kern/uipc_proto.c diff -u src/sys/kern/uipc_proto.c:1.21 src/sys/kern/uipc_proto.c:1.21.12.1 --- src/sys/kern/uipc_proto.c:1.21 Thu Apr 24 11:38:36 2008 +++ src/sys/kern/uipc_proto.c Sat Jun 18 16:42:04 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: uipc_proto.c,v 1.21 2008/04/24 11:38:36 ad Exp $ */ +/* $NetBSD: uipc_proto.c,v 1.21.12.1 2011/06/18 16:42:04 bouyer Exp $ */ /*- * Copyright (c) 1982, 1986, 1993 @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uipc_proto.c,v 1.21 2008/04/24 11:38:36 ad Exp $); +__KERNEL_RCSID(0, $NetBSD: uipc_proto.c,v 1.21.12.1 2011/06/18 16:42:04 bouyer Exp $); #include sys/param.h #include sys/socket.h @@ -65,6 +65,13 @@ .pr_ctloutput = uipc_ctloutput, .pr_usrreq = uipc_usrreq, }, { + .pr_type = SOCK_SEQPACKET, + .pr_domain = unixdomain, + .pr_flags = PR_CONNREQUIRED|PR_WANTRCVD|PR_RIGHTS|PR_LISTEN| + PR_ATOMIC, + .pr_ctloutput = uipc_ctloutput, + .pr_usrreq = uipc_usrreq, + }, { .pr_input = raw_input, .pr_ctlinput = raw_ctlinput, .pr_usrreq = raw_usrreq, Index: src/sys/kern/uipc_usrreq.c diff -u src/sys/kern/uipc_usrreq.c:1.119.4.3 src/sys/kern/uipc_usrreq.c:1.119.4.4 --- src/sys/kern/uipc_usrreq.c:1.119.4.3 Sun Nov 8 21:47:45 2009 +++ src/sys/kern/uipc_usrreq.c Sat Jun 18 16:42:04 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: uipc_usrreq.c,v 1.119.4.3 2009/11/08 21:47:45 snj Exp $ */ +/* $NetBSD: uipc_usrreq.c,v 1.119.4.4 2011/06/18 16:42:04 bouyer Exp $ */ /*- * Copyright (c) 1998, 2000, 2004, 2008, 2009 The NetBSD Foundation, Inc. @@ -96,7 +96,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uipc_usrreq.c,v 1.119.4.3 2009/11/08 21:47:45 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: uipc_usrreq.c,v 1.119.4.4 2011/06/18 16:42:04 bouyer Exp $); #include sys/param.h #include sys/systm.h @@ -124,7 +124,7 @@ * Unix communications domain. * * TODO: - * SEQPACKET, RDM + * RDM * rethink name space problems * need a proper out-of-band * @@ -486,6 +486,7 @@ panic(uipc 1); /*NOTREACHED*/ + case SOCK_SEQPACKET: /* FALLTHROUGH */ case SOCK_STREAM: #define rcv (so-so_rcv) #define snd (so2-so_snd) @@ -566,6 +567,7 @@ break; } + case SOCK_SEQPACKET: /* FALLTHROUGH */ case SOCK_STREAM: #define rcv (so2-so_rcv) #define snd (so-so_snd) @@ -578,7 +580,7 @@
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: bouyer Date: Sat Jun 18 16:43:07 UTC 2011 Modified Files: src/doc [netbsd-5]: CHANGES-5.2 Log Message: Tickets 1623, 1624, 1625, 1626, 1629, 1630, 1632, 1633 To generate a diff of this commit: cvs rdiff -u -r1.1.2.83 -r1.1.2.84 src/doc/CHANGES-5.2 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-5.2 diff -u src/doc/CHANGES-5.2:1.1.2.83 src/doc/CHANGES-5.2:1.1.2.84 --- src/doc/CHANGES-5.2:1.1.2.83 Sat Jun 18 11:21:43 2011 +++ src/doc/CHANGES-5.2 Sat Jun 18 16:43:07 2011 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.2,v 1.1.2.83 2011/06/18 11:21:43 bouyer Exp $ +# $NetBSD: CHANGES-5.2,v 1.1.2.84 2011/06/18 16:43:07 bouyer Exp $ A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2 release: @@ -5234,3 +5234,61 @@ Update bind to 9.7.3-P1, fixing CVE-2011-1910 and CVE-2011-0414 [spz, ticket #1634] +lib/libpuffs/puffs.c1.116 via patch +sys/fs/puffs/puffs_vnops.c 1.151 via patch +sys/fs/puffs/puffs_sys.h patch + + Call advlock method if supplied + [manu, ticket #1623] + +sys/ufs/ufs/ufs_extattr.c 1.29 via patch + + Fix filesystem root leaked lock when using UFS_EXTATTR_AUTOSTART. + This way, statvfs(2) calls obtained by df(1) or umount(8) will no + longer sleep forever in the kernel to acquire the lock. + [manu, ticket #1624] + +sys/dev/isa/pcppi.c1.36 +sys/dev/isa/pcppivar.h1.10 + + convert a lockless + spltty() combo to a IPL_VM mutex and cv. + hopefully this will avoid the beep-didn't-stop problem i had recently + that i was able to fix by calling wakeup() on pcppi's softc from ddb. + [mrg, ticket #1625] + +sys/arch/m68k/fpe/fpu_emulate.c 1.31 + + Fix botch in rev 1.28 that causes wrong results of fcmp and ftst + in FPE. fpu_upd_fpsr() should be called even in discard_result + case if an emulated instruction gets proper result without signal. + Fixes weird behavior of awk(1) seen on /etc/rc.d/postfix on XM6i and + TME emulating sun3 without 68881. + [tsutsui, ticket #1626] + +sys/kern/kern_fork.c1.181 + + Inherit proc_t::p_mqueue_cnt on fork(). + [rmind, ticket #1629] + +sys/arch/xen/xen/xbdback_xenbus.c 1.37 + + In xbdback(4), move the code that copies segments after the bound checks + of the ``nr_segments'' variable. Fix a possible DoS against xbdback(4) + [jym, ticket #1630] + +sys/dev/ic/gem.c1.97 + + Fix corrupted packet problem on 100Mb/s half duplex links. + We need to set echo disable on the internal phy too, not just on the + external phy. + [jdc, ticket #1632] + +sys/kern/uipc_domain.c1.86 +sys/kern/uipc_proto.c1.22 +sys/kern/uipc_usrreq.c1.134 + + Add SOCK_SEQPACKET to PL_LOCAL sockets. Based on patch from Jesse Off, + submitted 8 years ago: + http://mail-index.netbsd.org/tech-kern/2003/04/14/0006.html + [manu, ticket #1633] +
CVS commit: [netbsd-5-1] src/doc
Module Name:src Committed By: bouyer Date: Sat Jun 18 16:43:44 UTC 2011 Modified Files: src/doc [netbsd-5-1]: CHANGES-5.1.1 Log Message: tickets 1626, ,1629 1630, 1632 To generate a diff of this commit: cvs rdiff -u -r1.1.2.27 -r1.1.2.28 src/doc/CHANGES-5.1.1 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-5.1.1 diff -u src/doc/CHANGES-5.1.1:1.1.2.27 src/doc/CHANGES-5.1.1:1.1.2.28 --- src/doc/CHANGES-5.1.1:1.1.2.27 Sat Jun 18 11:30:29 2011 +++ src/doc/CHANGES-5.1.1 Sat Jun 18 16:43:44 2011 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1.1,v 1.1.2.27 2011/06/18 11:30:29 bouyer Exp $ +# $NetBSD: CHANGES-5.1.1,v 1.1.2.28 2011/06/18 16:43:44 bouyer Exp $ A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.1.1 release: @@ -2441,3 +2441,30 @@ Update bind to 9.7.3-P1, fixing CVE-2011-1910 and CVE-2011-0414 [spz, ticket #1634] +sys/arch/m68k/fpe/fpu_emulate.c 1.31 + + Fix botch in rev 1.28 that causes wrong results of fcmp and ftst + in FPE. fpu_upd_fpsr() should be called even in discard_result + case if an emulated instruction gets proper result without signal. + Fixes weird behavior of awk(1) seen on /etc/rc.d/postfix on XM6i and + TME emulating sun3 without 68881. + [tsutsui, ticket #1626] + +sys/kern/kern_fork.c1.181 + + Inherit proc_t::p_mqueue_cnt on fork(). + [rmind, ticket #1629] + +sys/arch/xen/xen/xbdback_xenbus.c 1.37 + + In xbdback(4), move the code that copies segments after the bound checks + of the ``nr_segments'' variable. Fix a possible DoS against xbdback(4) + [jym, ticket #1630] + +sys/dev/ic/gem.c1.97 + + Fix corrupted packet problem on 100Mb/s half duplex links. + We need to set echo disable on the internal phy too, not just on the + external phy. + [jdc, ticket #1632] +
CVS commit: [netbsd-5-0] src/doc
Module Name:src Committed By: bouyer Date: Sat Jun 18 16:44:07 UTC 2011 Modified Files: src/doc [netbsd-5-0]: CHANGES-5.0.3 Log Message: tickets 1626, 1629, 1632 To generate a diff of this commit: cvs rdiff -u -r1.1.2.42 -r1.1.2.43 src/doc/CHANGES-5.0.3 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-5.0.3 diff -u src/doc/CHANGES-5.0.3:1.1.2.42 src/doc/CHANGES-5.0.3:1.1.2.43 --- src/doc/CHANGES-5.0.3:1.1.2.42 Sat Jun 18 11:46:32 2011 +++ src/doc/CHANGES-5.0.3 Sat Jun 18 16:44:07 2011 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.0.3,v 1.1.2.42 2011/06/18 11:46:32 bouyer Exp $ +# $NetBSD: CHANGES-5.0.3,v 1.1.2.43 2011/06/18 16:44:07 bouyer Exp $ A complete list of changes from the NetBSD 5.0.2 release to the NetBSD 5.0.3 release: @@ -2758,3 +2758,24 @@ Update bind to 9.7.3-P1, fixing CVE-2011-1910 and CVE-2011-0414 [spz, ticket #1634] +sys/arch/m68k/fpe/fpu_emulate.c 1.31 + + Fix botch in rev 1.28 that causes wrong results of fcmp and ftst + in FPE. fpu_upd_fpsr() should be called even in discard_result + case if an emulated instruction gets proper result without signal. + Fixes weird behavior of awk(1) seen on /etc/rc.d/postfix on XM6i and + TME emulating sun3 without 68881. + [tsutsui, ticket #1626] + +sys/kern/kern_fork.c1.181 + + Inherit proc_t::p_mqueue_cnt on fork(). + [rmind, ticket #1629] + +sys/dev/ic/gem.c1.97 + + Fix corrupted packet problem on 100Mb/s half duplex links. + We need to set echo disable on the internal phy too, not just on the + external phy. + [jdc, ticket #1632] +
CVS commit: [netbsd-5] src
Module Name:src Committed By: bouyer Date: Sat Jun 18 17:00:26 UTC 2011 Modified Files: src/sbin/dump [netbsd-5]: snapshot.c src/share/man/man4 [netbsd-5]: fss.4 src/sys/dev [netbsd-5]: fss.c fssvar.h src/sys/kern [netbsd-5]: vfs_wapbl.c src/sys/ufs/ffs [netbsd-5]: ffs_balloc.c ffs_snapshot.c src/usr.sbin/fssconfig [netbsd-5]: fssconfig.c Log Message: Pull up following revision(s) (requested by hannken in ticket #1627): sys/kern/vfs_wapbl.c: revisions 1.41-1.42 sbin/dump/snapshot.c: revisions 1.6 (patch) share/man/man4/fss.4: revisions 1.15 (patch) sys/dev/fss.c: revisions1.73 (patch) sys/dev/fssvar.h: revisions 1.25 usr.sbin/fssconfig/fssconfig.c: revisions 1.7 sys/ufs/ffs/ffs_balloc.c: revisions 1.54 sys/ufs/ffs/ffs_snapshot.c: revisions 1.90, 1.98, 1.100-1.101, 1.103-1.110, 1.111, 1.112-1.115 (patch) - Try to keep snapshot indirect blocks contiguous. This speeds up snapshot creation by a factor of ~3 and reduces the file system suspension time by a factor of ~5. - Refine the scope of WAPBL transactions and the limit for deallocations in one transaction so we should no longer get a wapbl_flush: current transaction too big to flush panic when creating or removing snapshots on larger logging disks. - fss(4): Allow FSSIOCSET to set the initial flags. Add a new flag FSS_UNLINK_ON_CREATE to unlink the backing store before the snapshot gets created. With this change dump(8) no longer dumps the zero-sized, but named snapshot it is working on. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.4.4.1 src/sbin/dump/snapshot.c cvs rdiff -u -r1.12 -r1.12.2.1 src/share/man/man4/fss.4 cvs rdiff -u -r1.60.4.3 -r1.60.4.4 src/sys/dev/fss.c cvs rdiff -u -r1.23 -r1.23.4.1 src/sys/dev/fssvar.h cvs rdiff -u -r1.3.8.5 -r1.3.8.6 src/sys/kern/vfs_wapbl.c cvs rdiff -u -r1.51 -r1.51.4.1 src/sys/ufs/ffs/ffs_balloc.c cvs rdiff -u -r1.82.4.3 -r1.82.4.4 src/sys/ufs/ffs/ffs_snapshot.c cvs rdiff -u -r1.6 -r1.6.6.1 src/usr.sbin/fssconfig/fssconfig.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/dump/snapshot.c diff -u src/sbin/dump/snapshot.c:1.4 src/sbin/dump/snapshot.c:1.4.4.1 --- src/sbin/dump/snapshot.c:1.4 Mon Apr 28 20:23:08 2008 +++ src/sbin/dump/snapshot.c Sat Jun 18 17:00:25 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: snapshot.c,v 1.4 2008/04/28 20:23:08 martin Exp $ */ +/* $NetBSD: snapshot.c,v 1.4.4.1 2011/06/18 17:00:25 bouyer Exp $ */ /*- * Copyright (c) 2005 The NetBSD Foundation, Inc. @@ -56,7 +56,7 @@ int snap_open(char *mountpoint, char *backup, time_t *snap_date, char **snap_dev) { - int i, fd, israw, fsinternal, dounlink, flags; + int i, fd, israw, fsinternal, dounlink; char path[MAXPATHLEN], fss_dev[14]; dev_t mountdev; struct fss_set fss; @@ -118,6 +118,9 @@ if (close(fd) 0) goto fail; + fss.fss_flags = FSS_UNCONFIG_ON_CLOSE; + if (dounlink) + fss.fss_flags |= FSS_UNLINK_ON_CREATE; /* * Create the snapshot on the first free snapshot device. */ @@ -126,9 +129,6 @@ if ((fd = open(fss_dev, O_RDWR, 0)) 0) goto fail; - if (ioctl(fd, FSSIOFGET, flags) 0) - goto fail; - if (ioctl(fd, FSSIOCSET, fss) 0) { if (errno != EBUSY) goto fail; @@ -136,6 +136,7 @@ fd = -1; continue; } + dounlink = 0; if (snap_dev != NULL) { *snap_dev = strdup(fss_dev); @@ -145,10 +146,7 @@ } } - flags |= FSS_UNCONFIG_ON_CLOSE; - if (ioctl(fd, FSSIOCGET, fsg) 0 || - ioctl(fd, FSSIOFSET, flags) 0 || - (!israw unlink(fss.fss_bstore) 0)) { + if (ioctl(fd, FSSIOCGET, fsg) 0) { ioctl(fd, FSSIOCCLR); goto fail; } Index: src/share/man/man4/fss.4 diff -u src/share/man/man4/fss.4:1.12 src/share/man/man4/fss.4:1.12.2.1 --- src/share/man/man4/fss.4:1.12 Sun Sep 21 10:25:07 2008 +++ src/share/man/man4/fss.4 Sat Jun 18 17:00:25 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: fss.4,v 1.12 2008/09/21 10:25:07 hannken Exp $ */ +.\ $NetBSD: fss.4,v 1.12.2.1 2011/06/18 17:00:25 bouyer Exp $ */ .\ .\ .\ Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\ POSSIBILITY OF SUCH DAMAGE. .\ -.Dd September 21, 2008 +.Dd February 24, 2011 .Dt FSS 4 .Os .Sh NAME @@ -65,6 +65,7 @@ char *fss_mount; char *fss_bstore; blksize_t fss_csize; + int fss_flags; }; .Ed .Pp @@ -78,6 +79,9 @@ The struct element .Va fss_csize is the preferred size of this data. +The struct element +.Va fss_flags +is the initial set of flags. .It Dv FSSIOCGET(struct fss_get) Gets the status of a .Nm @@ -120,6 +124,10 @@ Unconfigure the .Nm device on the last close. +.It Dv FSS_UNLINK_ON_CREATE +Unlink the backing file
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: bouyer Date: Sat Jun 18 17:03:15 UTC 2011 Modified Files: src/doc [netbsd-5]: CHANGES-5.2 Log Message: Ticket 1627 To generate a diff of this commit: cvs rdiff -u -r1.1.2.84 -r1.1.2.85 src/doc/CHANGES-5.2 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-5.2 diff -u src/doc/CHANGES-5.2:1.1.2.84 src/doc/CHANGES-5.2:1.1.2.85 --- src/doc/CHANGES-5.2:1.1.2.84 Sat Jun 18 16:43:07 2011 +++ src/doc/CHANGES-5.2 Sat Jun 18 17:03:14 2011 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.2,v 1.1.2.84 2011/06/18 16:43:07 bouyer Exp $ +# $NetBSD: CHANGES-5.2,v 1.1.2.85 2011/06/18 17:03:14 bouyer Exp $ A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2 release: @@ -5292,3 +5292,24 @@ http://mail-index.netbsd.org/tech-kern/2003/04/14/0006.html [manu, ticket #1633] +sys/kern/vfs_wapbl.c1.41-1.42 +sbin/dump/snapshot.c1.6 (patch) +share/man/man4/fss.41.15 (patch) +sys/dev/fss.c 1.73 (patch) +sys/dev/fssvar.h1.25 +usr.sbin/fssconfig/fssconfig.c 1.7 +sys/ufs/ffs/ffs_balloc.c 1.54 +sys/ufs/ffs/ffs_snapshot.c 1.90, 1.98, 1.100-1.101, 1.103-1.110, 1.111, 1.112-1.115 (patch) + + - Try to keep snapshot indirect blocks contiguous. This speeds up + snapshot creation by a factor of ~3 and reduces the file system + suspension time by a factor of ~5. + - Refine the scope of WAPBL transactions and the limit for + deallocations in one transaction so we should no longer get a + wapbl_flush: current transaction too big to flush panic when + creating or removing snapshots on larger logging disks. + - fss(4): Allow FSSIOCSET to set the initial flags. Add a new flag + FSS_UNLINK_ON_CREATE to unlink the backing store before the snapshot + gets created. With this change dump(8) no longer dumps the + zero-sized, but named snapshot it is working on. + [hannken, ticket #1627]
CVS commit: src/sys/arch/powerpc/include/ibm4xx
Module Name:src Committed By: matt Date: Sat Jun 18 17:06:52 UTC 2011 Modified Files: src/sys/arch/powerpc/include/ibm4xx: cpu.h spr.h Log Message: Move PVR definitions to powerpc/ibm4xx/spr.h No need to include powerpc/cpu.h in powerpc/ib4xx/cpu.h To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/powerpc/include/ibm4xx/cpu.h cvs rdiff -u -r1.2 -r1.3 src/sys/arch/powerpc/include/ibm4xx/spr.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/powerpc/include/ibm4xx/cpu.h diff -u src/sys/arch/powerpc/include/ibm4xx/cpu.h:1.17 src/sys/arch/powerpc/include/ibm4xx/cpu.h:1.18 --- src/sys/arch/powerpc/include/ibm4xx/cpu.h:1.17 Fri Jun 17 19:03:03 2011 +++ src/sys/arch/powerpc/include/ibm4xx/cpu.h Sat Jun 18 17:06:52 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.17 2011/06/17 19:03:03 matt Exp $ */ +/* $NetBSD: cpu.h,v 1.18 2011/06/18 17:06:52 matt Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -42,30 +42,6 @@ #include powerpc/ibm4xx/spr.h #include powerpc/ibm4xx/dcr4xx.h -/* PVRs for different IBM CPUs */ -#define PVR_401A1 0x0021 -#define PVR_401B2 0x0022 -#define PVR_401C2 0x0023 -#define PVR_401D2 0x0024 -#define PVR_401E2 0x0025 -#define PVR_401F2 0x0026 -#define PVR_401G2 0x0027 - -#define PVR_403 0x0020 - -#define PVR_405GP 0x4011 -#define PVR_405GP_PASS1 0x4011 /* RevA */ -#define PVR_405GP_PASS2 0x40110040 /* RevB */ -#define PVR_405GP_PASS2_1 0x40110082 /* RevC */ -#define PVR_405GP_PASS3 0x401100c4 /* RevD */ -#define PVR_405GPR 0x5091 -#define PVR_405GPR_REVB 0x50910951 - -#define PVR_405D5X1 0x2001 /* Virtex II Pro */ -#define PVR_405D5X2 0x20011000 /* Virtex 4 FX */ - -#define PVR_405EX 0x1291 - #if defined(_KERNEL) extern char bootpath[]; @@ -147,8 +123,6 @@ } #endif /* _KERNEL */ -#include powerpc/cpu.h - /* Board info dictionary */ extern prop_dictionary_t board_properties; extern void board_info_init(void); Index: src/sys/arch/powerpc/include/ibm4xx/spr.h diff -u src/sys/arch/powerpc/include/ibm4xx/spr.h:1.2 src/sys/arch/powerpc/include/ibm4xx/spr.h:1.3 --- src/sys/arch/powerpc/include/ibm4xx/spr.h:1.2 Thu Mar 18 13:47:04 2010 +++ src/sys/arch/powerpc/include/ibm4xx/spr.h Sat Jun 18 17:06:52 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: spr.h,v 1.2 2010/03/18 13:47:04 kiyohara Exp $ */ +/* $NetBSD: spr.h,v 1.3 2011/06/18 17:06:52 matt Exp $ */ #ifndef _POWERPC_IBM4XX_SPR_H_ #define _POWERPC_IBM4XX_SPR_H_ @@ -34,6 +34,30 @@ #define IBM405EP 0x5121 #define IBMSTB25 0x5151 +/* PVRs for different IBM CPUs */ +#define PVR_401A1 0x0021 +#define PVR_401B2 0x0022 +#define PVR_401C2 0x0023 +#define PVR_401D2 0x0024 +#define PVR_401E2 0x0025 +#define PVR_401F2 0x0026 +#define PVR_401G2 0x0027 + +#define PVR_403 0x0020 + +#define PVR_405GP 0x4011 +#define PVR_405GP_PASS1 0x4011 /* RevA */ +#define PVR_405GP_PASS2 0x40110040 /* RevB */ +#define PVR_405GP_PASS2_1 0x40110082 /* RevC */ +#define PVR_405GP_PASS3 0x401100c4 /* RevD */ +#define PVR_405GPR 0x5091 +#define PVR_405GPR_REVB 0x50910951 + +#define PVR_405D5X1 0x2001 /* Virtex II Pro */ +#define PVR_405D5X2 0x20011000 /* Virtex 4 FX */ + +#define PVR_405EX 0x1291 + #define SPR_ZPR 0x3b0 /* .4.. Zone Protection Register */ #define SPR_PID 0x3b1 /* .4.. Process ID */ #define SPR_MMUCR 0x3b2 /* .4.. MMU Control Register */
CVS commit: [netbsd-5] src/lib/libc/gen
Module Name:src Committed By: bouyer Date: Sat Jun 18 17:20:32 UTC 2011 Modified Files: src/lib/libc/gen [netbsd-5]: getgrent.c Log Message: Pull up following revision(s) (requested by sjg in ticket #1636): lib/libc/gen/getgrent.c: revision 1.63 _gr_copy() can get called with fromgrp-gr_mem == NULL. To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.62.6.1 src/lib/libc/gen/getgrent.c 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/gen/getgrent.c diff -u src/lib/libc/gen/getgrent.c:1.62 src/lib/libc/gen/getgrent.c:1.62.6.1 --- src/lib/libc/gen/getgrent.c:1.62 Mon Apr 28 20:22:59 2008 +++ src/lib/libc/gen/getgrent.c Sat Jun 18 17:20:31 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: getgrent.c,v 1.62 2008/04/28 20:22:59 martin Exp $ */ +/* $NetBSD: getgrent.c,v 1.62.6.1 2011/06/18 17:20:31 bouyer Exp $ */ /*- * Copyright (c) 1999-2000, 2004-2005 The NetBSD Foundation, Inc. @@ -88,7 +88,7 @@ #if 0 static char sccsid[] = @(#)getgrent.c 8.2 (Berkeley) 3/21/94; #else -__RCSID($NetBSD: getgrent.c,v 1.62 2008/04/28 20:22:59 martin Exp $); +__RCSID($NetBSD: getgrent.c,v 1.62.6.1 2011/06/18 17:20:31 bouyer Exp $); #endif #endif /* LIBC_SCCS and not lint */ @@ -270,6 +270,9 @@ COPYSTR(grp-gr_passwd, fromgrp-gr_passwd); grp-gr_gid = fromgrp-gr_gid; + if (fromgrp-gr_mem == NULL) + return 0; + for (memc = 0; fromgrp-gr_mem[memc]; memc++) continue; memc++; /* for final NULL */
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: bouyer Date: Sat Jun 18 17:21:32 UTC 2011 Modified Files: src/doc [netbsd-5]: CHANGES-5.2 Log Message: ticket 1636 To generate a diff of this commit: cvs rdiff -u -r1.1.2.85 -r1.1.2.86 src/doc/CHANGES-5.2 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-5.2 diff -u src/doc/CHANGES-5.2:1.1.2.85 src/doc/CHANGES-5.2:1.1.2.86 --- src/doc/CHANGES-5.2:1.1.2.85 Sat Jun 18 17:03:14 2011 +++ src/doc/CHANGES-5.2 Sat Jun 18 17:21:32 2011 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.2,v 1.1.2.85 2011/06/18 17:03:14 bouyer Exp $ +# $NetBSD: CHANGES-5.2,v 1.1.2.86 2011/06/18 17:21:32 bouyer Exp $ A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2 release: @@ -5313,3 +5313,9 @@ gets created. With this change dump(8) no longer dumps the zero-sized, but named snapshot it is working on. [hannken, ticket #1627] + +lib/libc/gen/getgrent.c1.63 + + _gr_copy() can get called with fromgrp-gr_mem == NULL. + [sjg, ticket #1636] +
CVS commit: src/lib/libm/arch/i387
Module Name:src Committed By: joerg Date: Sat Jun 18 18:16:40 UTC 2011 Modified Files: src/lib/libm/arch/i387: abi.h Log Message: SSE2 registers are only used for float and double arguments, so update comment to reflect reality. Add some accessor macros for long double arguments for i386 and x86_64. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/lib/libm/arch/i387/abi.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libm/arch/i387/abi.h diff -u src/lib/libm/arch/i387/abi.h:1.5 src/lib/libm/arch/i387/abi.h:1.6 --- src/lib/libm/arch/i387/abi.h:1.5 Mon Jun 23 10:24:13 2008 +++ src/lib/libm/arch/i387/abi.h Sat Jun 18 18:16:40 2011 @@ -1,12 +1,12 @@ -/* $NetBSD: abi.h,v 1.5 2008/06/23 10:24:13 drochner Exp $ */ +/* $NetBSD: abi.h,v 1.6 2011/06/18 18:16:40 joerg Exp $ */ /* * Written by Frank van der Linden (f...@wasabisystems.com) */ /* - * The x86-64 ABI specifies that float, double and long double - * arguments are passed in SSE2 (xmm) registers. Unfortunately, + * The x86-64 ABI specifies that float and double arguments + * are passed in SSE2 (xmm) registers. Unfortunately, * there is no way to push those on to the FP stack, which is * where the fancier instructions get their arguments from. * @@ -16,6 +16,8 @@ #ifdef __x86_64__ +#define ARG_LONG_DOUBLE_ONE 8(%rsp) +#define ARG_LONG_DOUBLE_TWO 24(%rsp) #define ARG_DOUBLE_ONE -8(%rsp) #define ARG_DOUBLE_ONE_LSW -8(%rsp) #define ARG_DOUBLE_ONE_MSW -4(%rsp) @@ -49,6 +51,8 @@ #else +#define ARG_LONG_DOUBLE_ONE 4(%rsp) +#define ARG_LONG_DOUBLE_TWO 16(%rsp) #define ARG_DOUBLE_ONE 4(%esp) #define ARG_DOUBLE_ONE_LSW 4(%esp) #define ARG_DOUBLE_ONE_MSW 8(%esp)
CVS commit: src/etc/rc.d
Module Name:src Committed By: plunky Date: Sat Jun 18 18:43:41 UTC 2011 Removed Files: src/etc/rc.d: btattach btconfig btdevctl bthcid sdpd Log Message: remove empty files To generate a diff of this commit: cvs rdiff -u -r1.2 -r0 src/etc/rc.d/btattach src/etc/rc.d/btconfig cvs rdiff -u -r1.5 -r0 src/etc/rc.d/btdevctl cvs rdiff -u -r1.3 -r0 src/etc/rc.d/bthcid cvs rdiff -u -r1.4 -r0 src/etc/rc.d/sdpd Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch
Module Name:src Committed By: nakayama Date: Sat Jun 18 18:51:18 UTC 2011 Modified Files: src/sys/arch/sparc/include: types.h src/sys/arch/sparc64/sparc64: cpu.c genassym.cf intr.c locore.s pmap.c Log Message: Add fast softint(9) support for sparc64. Reviewed on port-sparc64. To generate a diff of this commit: cvs rdiff -u -r1.58 -r1.59 src/sys/arch/sparc/include/types.h cvs rdiff -u -r1.98 -r1.99 src/sys/arch/sparc64/sparc64/cpu.c cvs rdiff -u -r1.64 -r1.65 src/sys/arch/sparc64/sparc64/genassym.cf cvs rdiff -u -r1.62 -r1.63 src/sys/arch/sparc64/sparc64/intr.c cvs rdiff -u -r1.333 -r1.334 src/sys/arch/sparc64/sparc64/locore.s cvs rdiff -u -r1.273 -r1.274 src/sys/arch/sparc64/sparc64/pmap.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/include/types.h diff -u src/sys/arch/sparc/include/types.h:1.58 src/sys/arch/sparc/include/types.h:1.59 --- src/sys/arch/sparc/include/types.h:1.58 Sun Jun 12 03:35:46 2011 +++ src/sys/arch/sparc/include/types.h Sat Jun 18 18:51:17 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.58 2011/06/12 03:35:46 rmind Exp $ */ +/* $NetBSD: types.h,v 1.59 2011/06/18 18:51:17 nakayama Exp $ */ /* * Copyright (c) 1992, 1993 @@ -51,6 +51,8 @@ #include opt_sparc_arch.h #endif +#ifndef _LOCORE + #include sys/cdefs.h #include sys/featuretest.h #include machine/int_types.h @@ -113,6 +115,8 @@ #define __SIMPLELOCK_LOCKED 0xff #define __SIMPLELOCK_UNLOCKED 0 +#endif /* _LOCORE */ + #define __HAVE_DEVICE_REGISTER #define __HAVE_SYSCALL_INTERN #define __GENERIC_SOFT_INTERRUPTS_ALL_LEVELS @@ -122,6 +126,7 @@ #define __HAVE_DEVICE_REGISTER_POSTCONFIG #define __HAVE_ATOMIC64_OPS #define __HAVE_CPU_COUNTER /* sparc v9 CPUs have %tick */ +#define __HAVE_FAST_SOFTINTS #if defined(_KERNEL) #define __HAVE_RAS #endif Index: src/sys/arch/sparc64/sparc64/cpu.c diff -u src/sys/arch/sparc64/sparc64/cpu.c:1.98 src/sys/arch/sparc64/sparc64/cpu.c:1.99 --- src/sys/arch/sparc64/sparc64/cpu.c:1.98 Sat Nov 6 11:46:03 2010 +++ src/sys/arch/sparc64/sparc64/cpu.c Sat Jun 18 18:51:18 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.98 2010/11/06 11:46:03 uebayasi Exp $ */ +/* $NetBSD: cpu.c,v 1.99 2011/06/18 18:51:18 nakayama Exp $ */ /* * Copyright (c) 1996 @@ -52,7 +52,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.98 2010/11/06 11:46:03 uebayasi Exp $); +__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.99 2011/06/18 18:51:18 nakayama Exp $); #include opt_multiprocessor.h @@ -173,6 +173,7 @@ cpi-ci_curlwp = NULL; cpi-ci_cpuid = portid; cpi-ci_fplwp = NULL; + cpi-ci_eintstack = NULL; cpi-ci_spinup = NULL; cpi-ci_paddr = pa0; cpi-ci_self = cpi; Index: src/sys/arch/sparc64/sparc64/genassym.cf diff -u src/sys/arch/sparc64/sparc64/genassym.cf:1.64 src/sys/arch/sparc64/sparc64/genassym.cf:1.65 --- src/sys/arch/sparc64/sparc64/genassym.cf:1.64 Fri Jan 14 02:06:32 2011 +++ src/sys/arch/sparc64/sparc64/genassym.cf Sat Jun 18 18:51:18 2011 @@ -1,4 +1,4 @@ -# $NetBSD: genassym.cf,v 1.64 2011/01/14 02:06:32 rmind Exp $ +# $NetBSD: genassym.cf,v 1.65 2011/06/18 18:51:18 nakayama Exp $ # # Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -112,6 +112,7 @@ define PAGE_SIZE PAGE_SIZE # Important offsets into the lwp and proc structs associated constants +define L_CTXSWTCH offsetof(struct lwp, l_ctxswtch) define L_PCB offsetof(struct lwp, l_addr) define L_PROC offsetof(struct lwp, l_proc) define L_TF offsetof(struct lwp, l_md.md_tf) @@ -146,11 +147,12 @@ define CI_NUMBER offsetof(struct cpu_info, ci_data.cpu_index) define CI_FPLWP offsetof(struct cpu_info, ci_fplwp) define CI_UPAID offsetof(struct cpu_info, ci_cpuid) +define CI_MTX_COUNT offsetof(struct cpu_info, ci_mtx_count) define CI_SPINUP offsetof(struct cpu_info, ci_spinup) define CI_PADDR offsetof(struct cpu_info, ci_paddr) define CI_WANT_AST offsetof(struct cpu_info, ci_want_ast) define CI_WANT_RESCHED offsetof(struct cpu_info, ci_want_resched) -define CI_EINTRSTACK offsetof(struct cpu_info, ci_eintstack) +define CI_EINTSTACK offsetof(struct cpu_info, ci_eintstack) define CI_IDLELWP offsetof(struct cpu_info, ci_data.cpu_idlelwp) define CI_NFAULT offsetof(struct cpu_info, ci_data.cpu_nfault) define CI_NINTR offsetof(struct cpu_info, ci_data.cpu_nintr) Index: src/sys/arch/sparc64/sparc64/intr.c diff -u src/sys/arch/sparc64/sparc64/intr.c:1.62 src/sys/arch/sparc64/sparc64/intr.c:1.63 --- src/sys/arch/sparc64/sparc64/intr.c:1.62 Thu Dec 3 05:06:16 2009 +++ src/sys/arch/sparc64/sparc64/intr.c Sat Jun 18 18:51:18 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.62 2009/12/03 05:06:16 mrg Exp $ */ +/* $NetBSD: intr.c,v 1.63 2011/06/18 18:51:18 nakayama Exp $ */ /* * Copyright (c) 1992, 1993 @@ -41,7 +41,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.62 2009/12/03 05:06:16 mrg Exp $); +__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.63
CVS commit: src/doc
Module Name:src Committed By: nakayama Date: Sat Jun 18 18:54:25 UTC 2011 Modified Files: src/doc: CHANGES Log Message: sparc64: Add fast softint(9) support. To generate a diff of this commit: cvs rdiff -u -r1.1566 -r1.1567 src/doc/CHANGES 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 diff -u src/doc/CHANGES:1.1566 src/doc/CHANGES:1.1567 --- src/doc/CHANGES:1.1566 Fri Jun 17 03:57:39 2011 +++ src/doc/CHANGES Sat Jun 18 18:54:25 2011 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1566 $ +# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1567 $ # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -1039,3 +1039,4 @@ powerpc: the generic PIC code now supports matt@'s fast softintr code [macallan 20110615] alpha: support for Avalon A12 removed [matt 20110617] + sparc64: Add fast softint(9) support. [nakayama 20110618]
CVS commit: src/tests/lib/libcurses/director
Module Name:src Committed By: joerg Date: Sat Jun 18 20:05:28 UTC 2011 Modified Files: src/tests/lib/libcurses/director: testlang_conf.l Log Message: input() isn't used To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libcurses/director/testlang_conf.l Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libcurses/director/testlang_conf.l diff -u src/tests/lib/libcurses/director/testlang_conf.l:1.4 src/tests/lib/libcurses/director/testlang_conf.l:1.5 --- src/tests/lib/libcurses/director/testlang_conf.l:1.4 Sat Jun 11 18:03:18 2011 +++ src/tests/lib/libcurses/director/testlang_conf.l Sat Jun 18 20:05:28 2011 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: testlang_conf.l,v 1.4 2011/06/11 18:03:18 christos Exp $ */ +/* $NetBSD: testlang_conf.l,v 1.5 2011/06/18 20:05:28 joerg Exp $ */ /*- * Copyright 2009 Brett Lymn bl...@netbsd.org @@ -155,7 +155,7 @@ RHB \) %x incl -%option nounput +%option noinput nounput %%
CVS commit: src/tests/lib/libcurses/director
Module Name:src Committed By: joerg Date: Sat Jun 18 20:05:56 UTC 2011 Modified Files: src/tests/lib/libcurses/director: testlang_parse.y Log Message: Try to initialize retval to something sensible. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libcurses/director/testlang_parse.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libcurses/director/testlang_parse.y diff -u src/tests/lib/libcurses/director/testlang_parse.y:1.6 src/tests/lib/libcurses/director/testlang_parse.y:1.7 --- src/tests/lib/libcurses/director/testlang_parse.y:1.6 Fri Jun 17 16:32:31 2011 +++ src/tests/lib/libcurses/director/testlang_parse.y Sat Jun 18 20:05:56 2011 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: testlang_parse.y,v 1.6 2011/06/17 16:32:31 christos Exp $ */ +/* $NetBSD: testlang_parse.y,v 1.7 2011/06/18 20:05:56 joerg Exp $ */ /*- * Copyright 2009 Brett Lymn bl...@netbsd.org @@ -1241,6 +1241,7 @@ returns_t *retval; var_t *varptr; + retval = command.returns[ret]; varptr = vars[command.returns[ret].return_index]; if (varptr-value == NULL)
CVS commit: src/sys/arch/powerpc/ibm4xx
Module Name:src Committed By: matt Date: Sat Jun 18 20:28:50 UTC 2011 Modified Files: src/sys/arch/powerpc/ibm4xx: genassym.cf Log Message: Add things needed for __HAVE_FAST_SOFTINTRS To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/powerpc/ibm4xx/genassym.cf 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/ibm4xx/genassym.cf diff -u src/sys/arch/powerpc/ibm4xx/genassym.cf:1.19 src/sys/arch/powerpc/ibm4xx/genassym.cf:1.20 --- src/sys/arch/powerpc/ibm4xx/genassym.cf:1.19 Sun Jun 5 16:52:25 2011 +++ src/sys/arch/powerpc/ibm4xx/genassym.cf Sat Jun 18 20:28:48 2011 @@ -1,4 +1,4 @@ -# $NetBSD: genassym.cf,v 1.19 2011/06/05 16:52:25 matt Exp $ +# $NetBSD: genassym.cf,v 1.20 2011/06/18 20:28:48 matt Exp $ # # Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -132,6 +132,7 @@ define MSR_PR 31-ilog2(PSL_PR) define L_CPU offsetof(struct lwp, l_cpu) +define L_CTXSWTCH offsetof(struct lwp, l_ctxswtch) define L_MD_ASTPENDING offsetof(struct lwp, l_md.md_astpending) define L_MD_UTF offsetof(struct lwp, l_md.md_utf) define L_PCB offsetof(struct lwp, l_addr) @@ -139,6 +140,10 @@ define P_MD_SYSCALL offsetof(struct proc, p_md.md_syscall) +ifdef __HAVE_FAST_SOFTINTS +define __HAVE_FAST_SOFTINTS __HAVE_FAST_SOFTINTS +endif + define CI_SIZE sizeof(struct cpu_info) define CI_CURLWP offsetof(struct cpu_info, ci_curlwp) define CI_CURPCB offsetof(struct cpu_info, ci_curpcb) @@ -152,7 +157,7 @@ define CI_IPKDBSAVE offsetof(struct cpu_info, ci_ipkdbsave) define CI_TLBMISSSAVE offsetof(struct cpu_info, ci_tlbmisssave) define CI_IDLESPIN offsetof(struct cpu_info, ci_idlespin) -define CI_NINTR offsetof(struct cpu_info, ci_data.cpu_nintr) +define CI_MTX_COUNT offsetof(struct cpu_info, ci_mtx_count) define CPUSAVE_R28 CPUSAVE_R28*sizeof(register_t) define CPUSAVE_R29 CPUSAVE_R29*sizeof(register_t)
CVS commit: src/sys/uvm
Module Name:src Committed By: rmind Date: Sat Jun 18 20:29:56 UTC 2011 Modified Files: src/sys/uvm: uvm_amap.c Log Message: Add amap_adjref_anons() helper and simplify amap_ref()/amap_unref(). To generate a diff of this commit: cvs rdiff -u -r1.92 -r1.93 src/sys/uvm/uvm_amap.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/uvm/uvm_amap.c diff -u src/sys/uvm/uvm_amap.c:1.92 src/sys/uvm/uvm_amap.c:1.93 --- src/sys/uvm/uvm_amap.c:1.92 Thu Jun 16 19:42:20 2011 +++ src/sys/uvm/uvm_amap.c Sat Jun 18 20:29:56 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_amap.c,v 1.92 2011/06/16 19:42:20 rmind Exp $ */ +/* $NetBSD: uvm_amap.c,v 1.93 2011/06/18 20:29:56 rmind Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_amap.c,v 1.92 2011/06/16 19:42:20 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_amap.c,v 1.93 2011/06/18 20:29:56 rmind Exp $); #include opt_uvmhist.h @@ -1525,96 +1525,89 @@ } /* - * amap_ref: gain a reference to an amap + * amap_adjref_anons: adjust the reference count(s) on anons of the amap. + */ +static void +amap_adjref_anons(struct vm_amap *amap, vaddr_t offset, vsize_t len, +int refv, bool all) +{ +#ifdef UVM_AMAP_PPREF + KASSERT(mutex_owned(amap-am_lock)); + + if (amap-am_ppref == NULL !all len != amap-am_nslot) { + amap_pp_establish(amap, offset); + } + if (amap-am_ppref amap-am_ppref != PPREF_NONE) { + struct vm_anon *tofree = NULL; + + if (all) { + amap_pp_adjref(amap, 0, amap-am_nslot, refv, tofree); + } else { + amap_pp_adjref(amap, offset, len, refv, tofree); + } + uvm_anfree(tofree); + } +#endif +} + +/* + * amap_ref: gain a reference to an amap. * - * = amap must not be locked (we will lock) - * = offset and len are in units of pages - * = called at fork time to gain the child's reference + * = amap must not be locked (we will lock). + * = offset and len are in units of pages. + * = Called at fork time to gain the child's reference. */ void amap_ref(struct vm_amap *amap, vaddr_t offset, vsize_t len, int flags) { - UVMHIST_FUNC(amap_ref); UVMHIST_CALLED(maphist); amap_lock(amap); - if (flags AMAP_SHARED) + if (flags AMAP_SHARED) { amap-am_flags |= AMAP_SHARED; -#ifdef UVM_AMAP_PPREF - if (amap-am_ppref == NULL (flags AMAP_REFALL) == 0 - len != amap-am_nslot) - amap_pp_establish(amap, offset); -#endif - amap-am_ref++; -#ifdef UVM_AMAP_PPREF - if (amap-am_ppref amap-am_ppref != PPREF_NONE) { - struct vm_anon *tofree = NULL; - if (flags AMAP_REFALL) - amap_pp_adjref(amap, 0, amap-am_nslot, 1, tofree); - else - amap_pp_adjref(amap, offset, len, 1, tofree); - uvm_anfree(tofree); /* must be last action before unlock */ } -#endif + amap-am_ref++; + amap_adjref_anons(amap, offset, len, 1, (flags AMAP_REFALL) != 0); amap_unlock(amap); + UVMHIST_LOG(maphist,- done! amap=0x%x, amap, 0, 0, 0); } /* - * amap_unref: remove a reference to an amap + * amap_unref: remove a reference to an amap. * - * = caller must remove all pmap-level references to this amap before - * dropping the reference - * = called from uvm_unmap_detach [only] ... note that entry is no - * longer part of a map - * = amap must be unlocked (we will lock it). + * = All pmap-level references to this amap must be already removed. + * = Called from uvm_unmap_detach(); entry is already removed from the map. + * = We will lock amap, so it must be unlocked. */ void amap_unref(struct vm_amap *amap, vaddr_t offset, vsize_t len, bool all) { - struct vm_anon *tofree; - UVMHIST_FUNC(amap_unref); UVMHIST_CALLED(maphist); - /* - * lock it - */ amap_lock(amap); + UVMHIST_LOG(maphist, amap=0x%x refs=%d, nused=%d, amap, amap-am_ref, amap-am_nused, 0); + KASSERT(amap-am_ref 0); - KASSERT(amap_refs(amap) 0); - - /* - * if we are the last reference, free the amap and return. - */ - - amap-am_ref--; - - if (amap_refs(amap) == 0) { - amap_wipeout(amap); /* drops final ref and frees */ + if (--amap-am_ref == 0) { + /* + * If the last reference - wipeout and destroy the amap. + */ + amap_wipeout(amap); UVMHIST_LOG(maphist,- done (was last ref)!, 0, 0, 0, 0); - return; /* no need to unlock */ + return; } /* - * otherwise just drop the reference count(s) + * Otherwise, drop the reference count(s) on anons. */ - if (amap_refs(amap) == 1 (amap-am_flags AMAP_SHARED) != 0) - amap-am_flags = ~AMAP_SHARED; /* clear shared flag */ - tofree = NULL; -#ifdef UVM_AMAP_PPREF - if (amap-am_ppref == NULL all == 0 len != amap-am_nslot) - amap_pp_establish(amap, offset); - if (amap-am_ppref amap-am_ppref != PPREF_NONE) { - if (all) - amap_pp_adjref(amap, 0, amap-am_nslot, -1, tofree); - else - amap_pp_adjref(amap, offset, len, -1, tofree); + if (amap-am_ref == 1 (amap-am_flags AMAP_SHARED) != 0) { +
CVS commit: src/sys/arch/powerpc/conf
Module Name:src Committed By: matt Date: Sat Jun 18 20:35:06 UTC 2011 Modified Files: src/sys/arch/powerpc/conf: files.powerpc Log Message: Unconditionally build fixup.c To generate a diff of this commit: cvs rdiff -u -r1.80 -r1.81 src/sys/arch/powerpc/conf/files.powerpc 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/conf/files.powerpc diff -u src/sys/arch/powerpc/conf/files.powerpc:1.80 src/sys/arch/powerpc/conf/files.powerpc:1.81 --- src/sys/arch/powerpc/conf/files.powerpc:1.80 Wed Jun 15 15:22:56 2011 +++ src/sys/arch/powerpc/conf/files.powerpc Sat Jun 18 20:35:05 2011 @@ -1,4 +1,4 @@ -# $NetBSD: files.powerpc,v 1.80 2011/06/15 15:22:56 matt Exp $ +# $NetBSD: files.powerpc,v 1.81 2011/06/18 20:35:05 matt Exp $ defflag opt_altivec.h ALTIVEC K_ALTIVEC PPC_HAVE_SPE defflag opt_openpic.h OPENPIC OPENPIC_SERIAL_MODE OPENPIC_DISTRIBUTE @@ -9,7 +9,7 @@ file arch/powerpc/powerpc/copystr.c file arch/powerpc/powerpc/core_machdep.c coredump -file arch/powerpc/powerpc/fixup.c ppc_booke | (ppc_oea ppc_oea64) | (ppc_oea ppc_oea64_bridge) | (ppc_oea64 ppc_oea64_bridge) +file arch/powerpc/powerpc/fixup.c file arch/powerpc/powerpc/fubyte.c file arch/powerpc/powerpc/fuswintr.c file arch/powerpc/powerpc/ipkdb_glue.c ipkdb
CVS commit: src/lib/libm/arch/i387
Module Name:src Committed By: joerg Date: Sat Jun 18 20:49:26 UTC 2011 Modified Files: src/lib/libm/arch/i387: s_copysign.S s_copysignf.S Log Message: Switch to SSE code, since our gas supports it now. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/lib/libm/arch/i387/s_copysign.S cvs rdiff -u -r1.5 -r1.6 src/lib/libm/arch/i387/s_copysignf.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libm/arch/i387/s_copysign.S diff -u src/lib/libm/arch/i387/s_copysign.S:1.6 src/lib/libm/arch/i387/s_copysign.S:1.7 --- src/lib/libm/arch/i387/s_copysign.S:1.6 Sat Jul 26 19:25:01 2003 +++ src/lib/libm/arch/i387/s_copysign.S Sat Jun 18 20:49:26 2011 @@ -9,7 +9,7 @@ #include machine/asm.h -RCSID($NetBSD: s_copysign.S,v 1.6 2003/07/26 19:25:01 salo Exp $) +RCSID($NetBSD: s_copysign.S,v 1.7 2011/06/18 20:49:26 joerg Exp $) #ifdef __x86_64__ .Lpos: @@ -29,25 +29,10 @@ movl %eax,8(%esp) fldl 4(%esp) #else -#if 0 - /* - * XXXfvdl gas doesn't grok this yet. - */ movq .Lpos(%rip),%xmm2 movq .Lneg(%rip),%xmm3 pand %xmm2,%xmm1 pand %xmm3,%xmm0 por %xmm1,%xmm0 -#else - movsd %xmm0,-8(%rsp) - movsd %xmm1,-16(%rsp) - movl -12(%rsp),%edx - andl $0x8000,%edx - movl -4(%rsp),%eax - andl $0x7fff,%eax - orl %edx,%eax - movl %eax,-4(%rsp) - movsd -8(%rsp),%xmm0 -#endif #endif ret Index: src/lib/libm/arch/i387/s_copysignf.S diff -u src/lib/libm/arch/i387/s_copysignf.S:1.5 src/lib/libm/arch/i387/s_copysignf.S:1.6 --- src/lib/libm/arch/i387/s_copysignf.S:1.5 Sat Jul 26 19:25:01 2003 +++ src/lib/libm/arch/i387/s_copysignf.S Sat Jun 18 20:49:26 2011 @@ -9,7 +9,7 @@ * XXXfvdl split this file. */ -RCSID($NetBSD: s_copysignf.S,v 1.5 2003/07/26 19:25:01 salo Exp $) +RCSID($NetBSD: s_copysignf.S,v 1.6 2011/06/18 20:49:26 joerg Exp $) #ifdef __x86_64__ .Lneg: @@ -28,17 +28,6 @@ movl %eax,4(%esp) flds 4(%esp) #else -#if 0 - /* - * XXXfvdl gas doesn't grok this. - * but it's legal according to the p4 manual. - */ - movss.Lpos(%rip),%xmm2 - movss.Lneg(%rip),%xmm3 - pandq %xmm2,%xmm1 - pandq %xmm3,%xmm0 - porq%xmm1,%xmm0 -#else movss %xmm0,-4(%rsp) movss %xmm1,-8(%rsp) movl -8(%rsp),%edx @@ -49,5 +38,4 @@ movl %eax,-4(%rsp) movss -4(%rsp),%xmm0 #endif -#endif ret
CVS commit: src/sys/uvm
Module Name:src Committed By: rmind Date: Sat Jun 18 20:51:22 UTC 2011 Modified Files: src/sys/uvm: uvm_amap.c Log Message: amap_add/amap_unadd: clean up slightly, use unsigned, add asserts. To generate a diff of this commit: cvs rdiff -u -r1.93 -r1.94 src/sys/uvm/uvm_amap.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/uvm/uvm_amap.c diff -u src/sys/uvm/uvm_amap.c:1.93 src/sys/uvm/uvm_amap.c:1.94 --- src/sys/uvm/uvm_amap.c:1.93 Sat Jun 18 20:29:56 2011 +++ src/sys/uvm/uvm_amap.c Sat Jun 18 20:51:22 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_amap.c,v 1.93 2011/06/18 20:29:56 rmind Exp $ */ +/* $NetBSD: uvm_amap.c,v 1.94 2011/06/18 20:51:22 rmind Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_amap.c,v 1.93 2011/06/18 20:29:56 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_amap.c,v 1.94 2011/06/18 20:51:22 rmind Exp $); #include opt_uvmhist.h @@ -1456,34 +1456,37 @@ } /* - * amap_add: add (or replace) a page to an amap + * amap_add: add (or replace) a page to an amap. * - * = caller must lock amap. + * = amap should be locked by caller. + * = anon must have the lock associated with this amap. */ void amap_add(struct vm_aref *aref, vaddr_t offset, struct vm_anon *anon, bool replace) { - int slot; struct vm_amap *amap = aref-ar_amap; + u_int slot; + UVMHIST_FUNC(amap_add); UVMHIST_CALLED(maphist); KASSERT(mutex_owned(amap-am_lock)); + KASSERT(anon-an_lock == amap-am_lock); AMAP_B2SLOT(slot, offset); slot += aref-ar_pageoff; KASSERT(slot amap-am_nslot); if (replace) { - KASSERT(amap-am_anon[slot] != NULL); - if (amap-am_anon[slot]-an_page != NULL - (amap-am_flags AMAP_SHARED) != 0) { - pmap_page_protect(amap-am_anon[slot]-an_page, - VM_PROT_NONE); + struct vm_anon *oanon = amap-am_anon[slot]; + + KASSERT(oanon != NULL); + if (oanon-an_page (amap-am_flags AMAP_SHARED) != 0) { + pmap_page_protect(oanon-an_page, VM_PROT_NONE); /* * XXX: suppose page is supposed to be wired somewhere? */ } - } else { /* !replace */ + } else { KASSERT(amap-am_anon[slot] == NULL); amap-am_bckptr[slot] = amap-am_nused; amap-am_slots[amap-am_nused] = slot; @@ -1496,15 +1499,16 @@ } /* - * amap_unadd: remove a page from an amap + * amap_unadd: remove a page from an amap. * - * = caller must lock amap + * = amap should be locked by caller. */ void amap_unadd(struct vm_aref *aref, vaddr_t offset) { - int ptr, slot; struct vm_amap *amap = aref-ar_amap; + u_int slot, ptr, last; + UVMHIST_FUNC(amap_unadd); UVMHIST_CALLED(maphist); KASSERT(mutex_owned(amap-am_lock)); @@ -1512,13 +1516,16 @@ slot += aref-ar_pageoff; KASSERT(slot amap-am_nslot); KASSERT(amap-am_anon[slot] != NULL); + KASSERT(amap-am_anon[slot]-an_lock == amap-am_lock); amap-am_anon[slot] = NULL; ptr = amap-am_bckptr[slot]; - if (ptr != (amap-am_nused - 1)) { /* swap to keep slots contig? */ - amap-am_slots[ptr] = amap-am_slots[amap-am_nused - 1]; - amap-am_bckptr[amap-am_slots[ptr]] = ptr; /* back link */ + last = amap-am_nused - 1; + if (ptr != last) { + /* Move the last entry to keep the slots contiguous. */ + amap-am_slots[ptr] = amap-am_slots[last]; + amap-am_bckptr[amap-am_slots[ptr]] = ptr; } amap-am_nused--; UVMHIST_LOG(maphist, - done (amap=0x%x, slot=0x%x), amap, slot,0, 0);
CVS commit: src/sys/uvm
Module Name:src Committed By: rmind Date: Sat Jun 18 21:13:29 UTC 2011 Modified Files: src/sys/uvm: uvm_amap.c Log Message: Clean up, sprinkle asserts, consify, use unsigned, use kmem_zalloc instead of memset, reduce the scope of some variables, improve some comments. No functional change intended. To generate a diff of this commit: cvs rdiff -u -r1.94 -r1.95 src/sys/uvm/uvm_amap.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/uvm/uvm_amap.c diff -u src/sys/uvm/uvm_amap.c:1.94 src/sys/uvm/uvm_amap.c:1.95 --- src/sys/uvm/uvm_amap.c:1.94 Sat Jun 18 20:51:22 2011 +++ src/sys/uvm/uvm_amap.c Sat Jun 18 21:13:29 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_amap.c,v 1.94 2011/06/18 20:51:22 rmind Exp $ */ +/* $NetBSD: uvm_amap.c,v 1.95 2011/06/18 21:13:29 rmind Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_amap.c,v 1.94 2011/06/18 20:51:22 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_amap.c,v 1.95 2011/06/18 21:13:29 rmind Exp $); #include opt_uvmhist.h @@ -160,24 +160,22 @@ #endif /* UVM_AMAP_PPREF */ /* - * amap_alloc1: internal function that allocates an amap, but does not - * init the overlay. + * amap_alloc1: allocate an amap, but do not initialise the overlay. * - * = lock is not initialized + * = Note: lock is not set. */ static inline struct vm_amap * -amap_alloc1(int slots, int padslots, int waitf) +amap_alloc1(int slots, int padslots, int flags) { + const bool nowait = (flags UVM_FLAG_NOWAIT) != 0; + const km_flag_t kmflags = nowait ? KM_NOSLEEP : KM_SLEEP; struct vm_amap *amap; int totalslots; - km_flag_t kmflags; - amap = pool_cache_get(uvm_amap_cache, - ((waitf UVM_FLAG_NOWAIT) != 0) ? PR_NOWAIT : PR_WAITOK); - if (amap == NULL) - return(NULL); - - kmflags = ((waitf UVM_FLAG_NOWAIT) != 0) ? KM_NOSLEEP : KM_SLEEP; + amap = pool_cache_get(uvm_amap_cache, nowait ? PR_NOWAIT : PR_WAITOK); + if (amap == NULL) { + return NULL; + } totalslots = amap_roundup_slots(slots + padslots); amap-am_lock = NULL; amap-am_ref = 1; @@ -206,7 +204,7 @@ if (amap-am_anon == NULL) goto fail3; - return(amap); + return amap; fail3: kmem_free(amap-am_bckptr, totalslots * sizeof(int)); @@ -219,13 +217,13 @@ * XXX hack to tell the pagedaemon how many pages we need, * since we can need more than it would normally free. */ - if ((waitf UVM_FLAG_NOWAIT) != 0) { + if (nowait) { extern u_int uvm_extrapages; atomic_add_int(uvm_extrapages, ((sizeof(int) * 2 + sizeof(struct vm_anon *)) * totalslots) PAGE_SHIFT); } - return (NULL); + return NULL; } /* @@ -647,7 +645,8 @@ amap_share_protect(struct vm_map_entry *entry, vm_prot_t prot) { struct vm_amap *amap = entry-aref.ar_amap; - int slots, lcv, slot, stop; + u_int slots, lcv, slot, stop; + struct vm_anon *anon; KASSERT(mutex_owned(amap-am_lock)); @@ -655,48 +654,57 @@ stop = entry-aref.ar_pageoff + slots; if (slots amap-am_nused) { - /* cheaper to traverse am_anon */ + /* + * Cheaper to traverse am_anon. + */ for (lcv = entry-aref.ar_pageoff ; lcv stop ; lcv++) { - if (amap-am_anon[lcv] == NULL) + anon = amap-am_anon[lcv]; + if (anon == NULL) { continue; - if (amap-am_anon[lcv]-an_page != NULL) -pmap_page_protect(amap-am_anon[lcv]-an_page, - prot); + } + if (anon-an_page) { +pmap_page_protect(anon-an_page, prot); + } } return; } - /* cheaper to traverse am_slots */ + /* + * Cheaper to traverse am_slots. + */ for (lcv = 0 ; lcv amap-am_nused ; lcv++) { slot = amap-am_slots[lcv]; - if (slot entry-aref.ar_pageoff || slot = stop) + if (slot entry-aref.ar_pageoff || slot = stop) { continue; - if (amap-am_anon[slot]-an_page != NULL) - pmap_page_protect(amap-am_anon[slot]-an_page, prot); + } + anon = amap-am_anon[slot]; + if (anon-an_page) { + pmap_page_protect(anon-an_page, prot); + } } } /* * amap_wipeout: wipeout all anon's in an amap; then free the amap! * - * = called from amap_unref when the final reference to an amap is - * discarded (i.e. when reference count drops to 0) - * = the amap should be locked (by the caller) + * = Called from amap_unref(), when reference count drops to zero. + * = amap must be locked. */ void amap_wipeout(struct vm_amap *amap) { - int lcv, slot; - struct vm_anon *anon; + u_int lcv; + UVMHIST_FUNC(amap_wipeout); UVMHIST_CALLED(maphist); UVMHIST_LOG(maphist,(amap=0x%x), amap, 0,0,0); + KASSERT(mutex_owned(amap-am_lock)); KASSERT(amap-am_ref == 0); - if (__predict_false((amap-am_flags AMAP_SWAPOFF) != 0)) { + if (__predict_false(amap-am_flags AMAP_SWAPOFF)) { /* - * amap_swap_off will call us again. + * Note: amap_swap_off() will call us again. */ amap_unlock(amap); return; @@ -704,7 +712,8 @@
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: rmind Date: Sat Jun 18 21:18:20 UTC 2011 Modified Files: src/sys/arch/x86/x86: pmap.c Log Message: pmap_page_remove: perform TLB shootdown, as it is not caller's responsibility to perform pmap_update() according to the interface. Might want to revisit. Should fix recently reported tmpfs problems. Thanks to enami@ and hannken@! To generate a diff of this commit: cvs rdiff -u -r1.123 -r1.124 src/sys/arch/x86/x86/pmap.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/x86/pmap.c diff -u src/sys/arch/x86/x86/pmap.c:1.123 src/sys/arch/x86/x86/pmap.c:1.124 --- src/sys/arch/x86/x86/pmap.c:1.123 Mon Jun 13 04:30:40 2011 +++ src/sys/arch/x86/x86/pmap.c Sat Jun 18 21:18:20 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.123 2011/06/13 04:30:40 tls Exp $ */ +/* $NetBSD: pmap.c,v 1.124 2011/06/18 21:18:20 rmind Exp $ */ /*- * Copyright (c) 2008, 2010 The NetBSD Foundation, Inc. @@ -171,7 +171,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.123 2011/06/13 04:30:40 tls Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.124 2011/06/18 21:18:20 rmind Exp $); #include opt_user_ldt.h #include opt_lockdebug.h @@ -3532,6 +3532,7 @@ killlist = pve; } } + pmap_tlb_shootnow(); kpreempt_enable(); /* Now free unused pvs. */
CVS commit: src/bin/sh
Module Name:src Committed By: christos Date: Sat Jun 18 21:18:46 UTC 2011 Modified Files: src/bin/sh: alias.c alias.h arith.y cd.c cd.h exec.h expand.c expand.h histedit.c jobs.c jobs.h main.c main.h miscbltin.c myhistedit.h options.c options.h trap.c trap.h var.c var.h Log Message: PR/45069: Henning Petersen: Use prototypes from builtins.h . To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/bin/sh/alias.c cvs rdiff -u -r1.6 -r1.7 src/bin/sh/alias.h cvs rdiff -u -r1.19 -r1.20 src/bin/sh/arith.y src/bin/sh/jobs.h \ src/bin/sh/options.h cvs rdiff -u -r1.42 -r1.43 src/bin/sh/cd.c src/bin/sh/histedit.c cvs rdiff -u -r1.5 -r1.6 src/bin/sh/cd.h cvs rdiff -u -r1.21 -r1.22 src/bin/sh/exec.h cvs rdiff -u -r1.83 -r1.84 src/bin/sh/expand.c cvs rdiff -u -r1.17 -r1.18 src/bin/sh/expand.h cvs rdiff -u -r1.68 -r1.69 src/bin/sh/jobs.c cvs rdiff -u -r1.56 -r1.57 src/bin/sh/main.c cvs rdiff -u -r1.10 -r1.11 src/bin/sh/main.h src/bin/sh/myhistedit.h cvs rdiff -u -r1.38 -r1.39 src/bin/sh/miscbltin.c cvs rdiff -u -r1.41 -r1.42 src/bin/sh/options.c cvs rdiff -u -r1.34 -r1.35 src/bin/sh/trap.c cvs rdiff -u -r1.18 -r1.19 src/bin/sh/trap.h cvs rdiff -u -r1.39 -r1.40 src/bin/sh/var.c cvs rdiff -u -r1.24 -r1.25 src/bin/sh/var.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/sh/alias.c diff -u src/bin/sh/alias.c:1.13 src/bin/sh/alias.c:1.14 --- src/bin/sh/alias.c:1.13 Fri Oct 29 13:04:48 2010 +++ src/bin/sh/alias.c Sat Jun 18 17:18:46 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: alias.c,v 1.13 2010/10/29 17:04:48 stacktic Exp $ */ +/* $NetBSD: alias.c,v 1.14 2011/06/18 21:18:46 christos Exp $ */ /*- * Copyright (c) 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = @(#)alias.c 8.3 (Berkeley) 5/4/95; #else -__RCSID($NetBSD: alias.c,v 1.13 2010/10/29 17:04:48 stacktic Exp $); +__RCSID($NetBSD: alias.c,v 1.14 2011/06/18 21:18:46 christos Exp $); #endif #endif /* not lint */ @@ -50,6 +50,7 @@ #include mystring.h #include alias.h #include options.h /* XXX for argptr (should remove?) */ +#include builtins.h #include var.h #define ATABSIZE 39 Index: src/bin/sh/alias.h diff -u src/bin/sh/alias.h:1.6 src/bin/sh/alias.h:1.7 --- src/bin/sh/alias.h:1.6 Thu Aug 7 05:05:29 2003 +++ src/bin/sh/alias.h Sat Jun 18 17:18:46 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: alias.h,v 1.6 2003/08/07 09:05:29 agc Exp $ */ +/* $NetBSD: alias.h,v 1.7 2011/06/18 21:18:46 christos Exp $ */ /*- * Copyright (c) 1993 @@ -45,6 +45,4 @@ struct alias *lookupalias(char *, int); char *get_alias_text(char *); -int aliascmd(int, char **); -int unaliascmd(int, char **); void rmaliases(void); Index: src/bin/sh/arith.y diff -u src/bin/sh/arith.y:1.19 src/bin/sh/arith.y:1.20 --- src/bin/sh/arith.y:1.19 Fri Nov 13 08:49:09 2009 +++ src/bin/sh/arith.y Sat Jun 18 17:18:46 2011 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: arith.y,v 1.19 2009/11/13 13:49:09 gson Exp $ */ +/* $NetBSD: arith.y,v 1.20 2011/06/18 21:18:46 christos Exp $ */ /*- * Copyright (c) 1993 @@ -38,12 +38,13 @@ #if 0 static char sccsid[] = @(#)arith.y 8.3 (Berkeley) 5/4/95; #else -__RCSID($NetBSD: arith.y,v 1.19 2009/11/13 13:49:09 gson Exp $); +__RCSID($NetBSD: arith.y,v 1.20 2011/06/18 21:18:46 christos Exp $); #endif #endif /* not lint */ #include stdlib.h #include expand.h +#include builtins.h #include shell.h #include error.h #include output.h Index: src/bin/sh/jobs.h diff -u src/bin/sh/jobs.h:1.19 src/bin/sh/jobs.h:1.20 --- src/bin/sh/jobs.h:1.19 Thu Nov 27 16:16:14 2003 +++ src/bin/sh/jobs.h Sat Jun 18 17:18:46 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: jobs.h,v 1.19 2003/11/27 21:16:14 dsl Exp $ */ +/* $NetBSD: jobs.h,v 1.20 2011/06/18 21:18:46 christos Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -86,12 +86,7 @@ extern int job_warning; /* user was warned about stopped jobs */ void setjobctl(int); -int fgcmd(int, char **); -int bgcmd(int, char **); -int jobscmd(int, char **); void showjobs(struct output *, int); -int waitcmd(int, char **); -int jobidcmd(int, char **); struct job *makejob(union node *, int); int forkshell(struct job *, union node *, int); void forkchild(struct job *, union node *, int, int); Index: src/bin/sh/options.h diff -u src/bin/sh/options.h:1.19 src/bin/sh/options.h:1.20 --- src/bin/sh/options.h:1.19 Tue Dec 13 12:44:18 2005 +++ src/bin/sh/options.h Sat Jun 18 17:18:46 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: options.h,v 1.19 2005/12/13 17:44:18 dsl Exp $ */ +/* $NetBSD: options.h,v 1.20 2011/06/18 21:18:46 christos Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -126,8 +126,5 @@ void optschanged(void); void setparam(char **); void freeparam(volatile struct shparam *); -int shiftcmd(int, char **); -int setcmd(int, char **); -int getoptscmd(int, char **); int nextopt(const char *); void getoptsreset(const char *); Index: src/bin/sh/cd.c diff -u src/bin/sh/cd.c:1.42 src/bin/sh/cd.c:1.43 ---
CVS commit: src/lib/libm/arch/i387
Module Name:src Committed By: joerg Date: Sat Jun 18 21:24:51 UTC 2011 Modified Files: src/lib/libm/arch/i387: s_ceil.S s_ceilf.S s_floor.S s_floorf.S Log Message: Kill redundant ; To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/lib/libm/arch/i387/s_ceil.S \ src/lib/libm/arch/i387/s_floorf.S cvs rdiff -u -r1.8 -r1.9 src/lib/libm/arch/i387/s_ceilf.S \ src/lib/libm/arch/i387/s_floor.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libm/arch/i387/s_ceil.S diff -u src/lib/libm/arch/i387/s_ceil.S:1.7 src/lib/libm/arch/i387/s_ceil.S:1.8 --- src/lib/libm/arch/i387/s_ceil.S:1.7 Sat Jul 26 19:25:00 2003 +++ src/lib/libm/arch/i387/s_ceil.S Sat Jun 18 21:24:51 2011 @@ -7,7 +7,7 @@ #include abi.h -RCSID($NetBSD: s_ceil.S,v 1.7 2003/07/26 19:25:00 salo Exp $) +RCSID($NetBSD: s_ceil.S,v 1.8 2011/06/18 21:24:51 joerg Exp $) ENTRY(ceil) #ifdef __i386__ @@ -22,7 +22,7 @@ movw %dx,-8(%ebp) fldcw -8(%ebp) /* load modfied control word */ - fldl 8(%ebp); /* round */ + fldl 8(%ebp) /* round */ frndint fldcw -4(%ebp) /* restore original control word */ Index: src/lib/libm/arch/i387/s_floorf.S diff -u src/lib/libm/arch/i387/s_floorf.S:1.7 src/lib/libm/arch/i387/s_floorf.S:1.8 --- src/lib/libm/arch/i387/s_floorf.S:1.7 Fri Jul 16 18:40:24 2004 +++ src/lib/libm/arch/i387/s_floorf.S Sat Jun 18 21:24:51 2011 @@ -5,7 +5,7 @@ #include machine/asm.h -RCSID($NetBSD: s_floorf.S,v 1.7 2004/07/16 18:40:24 drochner Exp $) +RCSID($NetBSD: s_floorf.S,v 1.8 2011/06/18 21:24:51 joerg Exp $) ENTRY(floorf) #ifdef __i386__ @@ -20,7 +20,7 @@ movw %dx,-8(%ebp) fldcw -8(%ebp) /* load modfied control word */ - flds 8(%ebp); /* round */ + flds 8(%ebp) /* round */ frndint fldcw -4(%ebp) /* restore original control word */ Index: src/lib/libm/arch/i387/s_ceilf.S diff -u src/lib/libm/arch/i387/s_ceilf.S:1.8 src/lib/libm/arch/i387/s_ceilf.S:1.9 --- src/lib/libm/arch/i387/s_ceilf.S:1.8 Fri Jul 16 18:40:24 2004 +++ src/lib/libm/arch/i387/s_ceilf.S Sat Jun 18 21:24:51 2011 @@ -5,7 +5,7 @@ #include machine/asm.h -RCSID($NetBSD: s_ceilf.S,v 1.8 2004/07/16 18:40:24 drochner Exp $) +RCSID($NetBSD: s_ceilf.S,v 1.9 2011/06/18 21:24:51 joerg Exp $) ENTRY(ceilf) #ifdef __i386__ @@ -20,7 +20,7 @@ movw %dx,-8(%ebp) fldcw -8(%ebp) /* load modfied control word */ - flds 8(%ebp); /* round */ + flds 8(%ebp) /* round */ frndint fldcw -4(%ebp) /* restore original control word */ Index: src/lib/libm/arch/i387/s_floor.S diff -u src/lib/libm/arch/i387/s_floor.S:1.8 src/lib/libm/arch/i387/s_floor.S:1.9 --- src/lib/libm/arch/i387/s_floor.S:1.8 Sat Jul 26 19:25:02 2003 +++ src/lib/libm/arch/i387/s_floor.S Sat Jun 18 21:24:51 2011 @@ -5,7 +5,7 @@ #include machine/asm.h -RCSID($NetBSD: s_floor.S,v 1.8 2003/07/26 19:25:02 salo Exp $) +RCSID($NetBSD: s_floor.S,v 1.9 2011/06/18 21:24:51 joerg Exp $) ENTRY(floor) #ifdef __i386__ @@ -20,7 +20,7 @@ movw %dx,-8(%ebp) fldcw -8(%ebp) /* load modfied control word */ - fldl 8(%ebp); /* round */ + fldl 8(%ebp) /* round */ frndint fldcw -4(%ebp) /* restore original control word */
CVS commit: src/lib/libm/arch/i387
Module Name:src Committed By: joerg Date: Sat Jun 18 22:19:52 UTC 2011 Modified Files: src/lib/libm/arch/i387: abi.h Log Message: Use correct stack register as noticed by christos To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/lib/libm/arch/i387/abi.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libm/arch/i387/abi.h diff -u src/lib/libm/arch/i387/abi.h:1.6 src/lib/libm/arch/i387/abi.h:1.7 --- src/lib/libm/arch/i387/abi.h:1.6 Sat Jun 18 18:16:40 2011 +++ src/lib/libm/arch/i387/abi.h Sat Jun 18 22:19:52 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: abi.h,v 1.6 2011/06/18 18:16:40 joerg Exp $ */ +/* $NetBSD: abi.h,v 1.7 2011/06/18 22:19:52 joerg Exp $ */ /* * Written by Frank van der Linden (f...@wasabisystems.com) @@ -51,8 +51,8 @@ #else -#define ARG_LONG_DOUBLE_ONE 4(%rsp) -#define ARG_LONG_DOUBLE_TWO 16(%rsp) +#define ARG_LONG_DOUBLE_ONE 4(%esp) +#define ARG_LONG_DOUBLE_TWO 16(%esp) #define ARG_DOUBLE_ONE 4(%esp) #define ARG_DOUBLE_ONE_LSW 4(%esp) #define ARG_DOUBLE_ONE_MSW 8(%esp)
CVS commit: [netbsd-5] src/sys/dev/isa
Module Name:src Committed By: bouyer Date: Sat Jun 18 22:47:20 UTC 2011 Modified Files: src/sys/dev/isa [netbsd-5]: pcppi.c Log Message: Pull up following revision(s) (requested by mrg in ticket #1625): sys/dev/isa/pcppi.c: revision 1.37 avoid mutex locking botch and introduce an unlocked version of pcppi_bell_stop(). fixes a problem reported in private email. To generate a diff of this commit: cvs rdiff -u -r1.32.14.2 -r1.32.14.3 src/sys/dev/isa/pcppi.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/isa/pcppi.c diff -u src/sys/dev/isa/pcppi.c:1.32.14.2 src/sys/dev/isa/pcppi.c:1.32.14.3 --- src/sys/dev/isa/pcppi.c:1.32.14.2 Sat Jun 18 16:24:10 2011 +++ src/sys/dev/isa/pcppi.c Sat Jun 18 22:47:20 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pcppi.c,v 1.32.14.2 2011/06/18 16:24:10 bouyer Exp $ */ +/* $NetBSD: pcppi.c,v 1.32.14.3 2011/06/18 22:47:20 bouyer Exp $ */ /* * Copyright (c) 1996 Carnegie-Mellon University. @@ -28,7 +28,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pcppi.c,v 1.32.14.2 2011/06/18 16:24:10 bouyer Exp $); +__KERNEL_RCSID(0, $NetBSD: pcppi.c,v 1.32.14.3 2011/06/18 22:47:20 bouyer Exp $); #include attimer.h @@ -65,6 +65,7 @@ pcppi_match, pcppi_isa_attach, pcppi_detach, NULL, NULL, pcppi_childdet); static int pcppisearch(device_t, cfdata_t, const int *, void *); +static void pcppi_bell_stop_unlocked(void*); static void pcppi_bell_stop(void*); #if NATTIMER 0 @@ -270,7 +271,7 @@ cv_broadcast(sc-sc_stop_cv); } if (pitch == 0 || period == 0) { - pcppi_bell_stop(sc); + pcppi_bell_stop_unlocked(sc); sc-sc_bellpitch = 0; mutex_exit(sc-sc_lock); return; @@ -290,7 +291,7 @@ sc-sc_bellactive = 1; if (slp PCPPI_BELL_POLL) { delay((period * 100) / hz); - pcppi_bell_stop(sc); + pcppi_bell_stop_unlocked(sc); } else { sc-sc_timeout = 1; callout_reset(sc-sc_bell_ch, period, pcppi_bell_stop, sc); @@ -304,11 +305,10 @@ } static void -pcppi_bell_stop(void *arg) +pcppi_bell_stop_unlocked(void *arg) { struct pcppi_softc *sc = arg; - mutex_enter(sc-sc_lock); sc-sc_timeout = 0; /* disable bell */ @@ -318,6 +318,15 @@ sc-sc_bellactive = 0; if (sc-sc_slp) cv_broadcast(sc-sc_stop_cv); +} + +static void +pcppi_bell_stop(void *arg) +{ + struct pcppi_softc *sc = arg; + + mutex_enter(sc-sc_lock); + pcppi_bell_stop_unlocked(arg); mutex_exit(sc-sc_lock); }
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: bouyer Date: Sat Jun 18 22:48:29 UTC 2011 Modified Files: src/doc [netbsd-5]: CHANGES-5.2 Log Message: Add sys/dev/isa/pcppi.c 1.37 to ticket 1625 To generate a diff of this commit: cvs rdiff -u -r1.1.2.86 -r1.1.2.87 src/doc/CHANGES-5.2 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-5.2 diff -u src/doc/CHANGES-5.2:1.1.2.86 src/doc/CHANGES-5.2:1.1.2.87 --- src/doc/CHANGES-5.2:1.1.2.86 Sat Jun 18 17:21:32 2011 +++ src/doc/CHANGES-5.2 Sat Jun 18 22:48:29 2011 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.2,v 1.1.2.86 2011/06/18 17:21:32 bouyer Exp $ +# $NetBSD: CHANGES-5.2,v 1.1.2.87 2011/06/18 22:48:29 bouyer Exp $ A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2 release: @@ -5248,7 +5248,7 @@ longer sleep forever in the kernel to acquire the lock. [manu, ticket #1624] -sys/dev/isa/pcppi.c1.36 +sys/dev/isa/pcppi.c1.36, 1.37 sys/dev/isa/pcppivar.h1.10 convert a lockless + spltty() combo to a IPL_VM mutex and cv.
CVS commit: src/bin/pax
Module Name:src Committed By: christos Date: Sat Jun 18 23:07:04 UTC 2011 Modified Files: src/bin/pax: extern.h options.c pax.c Log Message: add --xz To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/bin/pax/extern.h cvs rdiff -u -r1.109 -r1.110 src/bin/pax/options.c cvs rdiff -u -r1.45 -r1.46 src/bin/pax/pax.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/pax/extern.h diff -u src/bin/pax/extern.h:1.56 src/bin/pax/extern.h:1.57 --- src/bin/pax/extern.h:1.56 Tue Apr 7 15:52:35 2009 +++ src/bin/pax/extern.h Sat Jun 18 19:07:04 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.56 2009/04/07 19:52:35 perry Exp $ */ +/* $NetBSD: extern.h,v 1.57 2011/06/18 23:07:04 christos Exp $ */ /*- * Copyright (c) 1992 Keith Muller. @@ -233,14 +233,12 @@ extern int cwdfd; extern int dflag; extern int iflag; -extern int jflag; extern int kflag; extern int lflag; extern int nflag; extern int tflag; extern int uflag; extern int vflag; -extern int zflag; extern int Dflag; extern int Hflag; extern int Lflag; Index: src/bin/pax/options.c diff -u src/bin/pax/options.c:1.109 src/bin/pax/options.c:1.110 --- src/bin/pax/options.c:1.109 Mon Aug 30 23:16:06 2010 +++ src/bin/pax/options.c Sat Jun 18 19:07:04 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: options.c,v 1.109 2010/08/31 03:16:06 enami Exp $ */ +/* $NetBSD: options.c,v 1.110 2011/06/18 23:07:04 christos Exp $ */ /*- * Copyright (c) 1992 Keith Muller. @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = @(#)options.c 8.2 (Berkeley) 4/18/94; #else -__RCSID($NetBSD: options.c,v 1.109 2010/08/31 03:16:06 enami Exp $); +__RCSID($NetBSD: options.c,v 1.110 2011/06/18 23:07:04 christos Exp $); #endif #endif /* not lint */ @@ -102,6 +102,7 @@ #define BZIP2_CMD bzip2 /* command to run as bzip2 */ #define GZIP_CMD gzip /* command to run as gzip */ +#define XZ_CMD xz /* command to run as xz */ #define COMPRESS_CMD compress /* command to run as compress */ /* @@ -124,8 +125,9 @@ #define OPT_INSECURE 14 #define OPT_STRICT 15 #define OPT_SPARSE 16 +#define OPT_XZ17 #if !HAVE_NBTOOL_CONFIG_H -#define OPT_CHROOT 17 +#define OPT_CHROOT 18 #endif /* @@ -242,6 +244,8 @@ OPT_FORCE_LOCAL }, { use-compress-program, required_argument, 0, OPT_USE_COMPRESS_PROGRAM }, + { xz, no_argument, 0, + OPT_XZ }, { 0, 0, 0, 0 }, }; @@ -320,7 +324,6 @@ /* * pass through bzip2 */ - jflag = 1; gzip_program = BZIP2_CMD; break; case 'k': @@ -476,7 +479,6 @@ /* * use gzip. Non standard option. */ - zflag = 1; gzip_program = GZIP_CMD; break; case 'A': @@ -646,9 +648,11 @@ forcelocal = 1; break; case OPT_USE_COMPRESS_PROGRAM: - zflag = 1; gzip_program = optarg; break; + case OPT_XZ: + gzip_program = XZ_CMD; + break; case '?': default: pax_usage(); @@ -786,6 +790,8 @@ OPT_EXCLUDE }, { no-recursion, no_argument, 0, OPT_NORECURSE }, + { xz, no_argument, 0, + OPT_XZ }, #if !HAVE_NBTOOL_CONFIG_H { chroot, no_argument, 0, OPT_CHROOT }, @@ -914,7 +920,6 @@ /* * pass through bzip2. not a standard option */ - jflag = 1; gzip_program = BZIP2_CMD; break; case 'k': @@ -1019,7 +1024,6 @@ /* * use gzip. Non standard option. */ - zflag = 1; gzip_program = GZIP_CMD; break; case 'B': @@ -1079,7 +1083,6 @@ /* * use compress. */ - zflag = 1; gzip_program = COMPRESS_CMD; break; case '0': @@ -1107,7 +1110,6 @@ /* Just ignore -- we always unlink first. */ break; case OPT_USE_COMPRESS_PROGRAM: - zflag = 1; gzip_program = optarg; break; case OPT_FORCE_LOCAL: @@ -1132,6 +1134,9 @@ do_chroot = 1; break; #endif + case OPT_XZ: + gzip_program = XZ_CMD; + break; default: tar_usage(); break; @@ -1431,6 +1436,8 @@ OPT_INSECURE }, { sparse, no_argument, 0, OPT_SPARSE }, + { xz, no_argument, 0, + OPT_XZ }, #ifdef notyet /* Not implemented */ @@ -1745,6 +1752,9 @@ case OPT_SPARSE: /* do nothing; we already generate sparse files */ break; + case OPT_XZ: + gzip_program = XZ_CMD; + break; default: cpio_usage(); break; Index: src/bin/pax/pax.c diff -u src/bin/pax/pax.c:1.45 src/bin/pax/pax.c:1.46 --- src/bin/pax/pax.c:1.45 Sat Jul 19 20:52:40 2008 +++ src/bin/pax/pax.c Sat Jun 18 19:07:04 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pax.c,v 1.45 2008/07/20 00:52:40 lukem Exp $ */ +/* $NetBSD: pax.c,v 1.46 2011/06/18 23:07:04 christos Exp $ */ /*- * Copyright (c) 1992 Keith Muller. @@ -44,7 +44,7 @@ #if 0 static char sccsid[] = @(#)pax.c 8.2 (Berkeley) 4/18/94; #else -__RCSID($NetBSD: pax.c,v 1.45 2008/07/20 00:52:40 lukem Exp $); +__RCSID($NetBSD: pax.c,v 1.46 2011/06/18 23:07:04 christos Exp $); #endif #endif /* not lint */
CVS commit: src/usr.bin/gzip
Module Name:src Committed By: christos Date: Sun Jun 19 00:43:54 UTC 2011 Modified Files: src/usr.bin/gzip: Makefile gzip.c Added Files: src/usr.bin/gzip: unxz.c Log Message: Add lzma (.xz) support. Somehow this does not decode after the first read yet. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/usr.bin/gzip/Makefile cvs rdiff -u -r1.99 -r1.100 src/usr.bin/gzip/gzip.c cvs rdiff -u -r0 -r1.1 src/usr.bin/gzip/unxz.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/gzip/Makefile diff -u src/usr.bin/gzip/Makefile:1.13 src/usr.bin/gzip/Makefile:1.14 --- src/usr.bin/gzip/Makefile:1.13 Tue Apr 14 18:15:20 2009 +++ src/usr.bin/gzip/Makefile Sat Jun 18 20:43:54 2011 @@ -1,12 +1,12 @@ -# $NetBSD: Makefile,v 1.13 2009/04/14 22:15:20 lukem Exp $ +# $NetBSD: Makefile,v 1.14 2011/06/19 00:43:54 christos Exp $ USE_FORT?= yes # data-driven bugs? PROG= gzip MAN= gzip.1 gzexe.1 zdiff.1 zforce.1 zgrep.1 zmore.1 znew.1 -DPADD= ${LIBZ} ${LIBBZ2} -LDADD= -lz -lbz2 +DPADD= ${LIBZ} ${LIBBZ2} ${LIBLZMA} +LDADD= -lz -lbz2 -llzma SCRIPTS= gzexe zdiff zforce zgrep zmore znew Index: src/usr.bin/gzip/gzip.c diff -u src/usr.bin/gzip/gzip.c:1.99 src/usr.bin/gzip/gzip.c:1.100 --- src/usr.bin/gzip/gzip.c:1.99 Wed Mar 23 08:59:44 2011 +++ src/usr.bin/gzip/gzip.c Sat Jun 18 20:43:54 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: gzip.c,v 1.99 2011/03/23 12:59:44 tsutsui Exp $ */ +/* $NetBSD: gzip.c,v 1.100 2011/06/19 00:43:54 christos Exp $ */ /* * Copyright (c) 1997, 1998, 2003, 2004, 2006 Matthew R. Green @@ -30,7 +30,7 @@ #ifndef lint __COPYRIGHT(@(#) Copyright (c) 1997, 1998, 2003, 2004, 2006\ Matthew R. Green. All rights reserved.); -__RCSID($NetBSD: gzip.c,v 1.99 2011/03/23 12:59:44 tsutsui Exp $); +__RCSID($NetBSD: gzip.c,v 1.100 2011/06/19 00:43:54 christos Exp $); #endif /* not lint */ /* @@ -81,6 +81,9 @@ #ifndef NO_PACK_SUPPORT FT_PACK, #endif +#ifndef NO_XZ_SUPPORT + FT_XZ, +#endif FT_LAST, FT_UNKNOWN }; @@ -101,6 +104,12 @@ #define PACK_MAGIC \037\036 #endif +#ifndef NO_XZ_SUPPORT +#include lzma.h +#define XZ_SUFFIX .xz +#define XZ_MAGIC \3757zXZ +#endif + #define GZ_SUFFIX .gz #define BUFLEN (64 * 1024) @@ -227,6 +236,10 @@ static off_t unpack(int, int, char *, size_t, off_t *); #endif +#ifndef NO_XZ_SUPPORT +static off_t unxz(int, int, char *, size_t, off_t *); +#endif + int main(int, char *p[]); #ifdef SMALL @@ -1097,6 +1110,11 @@ return FT_PACK; else #endif +#ifndef NO_XZ_SUPPORT + if (memcmp(buf, XZ_MAGIC, 4) == 0) /* XXX: We only have 4 bytes */ + return FT_XZ; + else +#endif return FT_UNKNOWN; } @@ -1326,7 +1344,6 @@ } method = file_gettype(header1); - #ifndef SMALL if (fflag == 0 method == FT_UNKNOWN) { maybe_warnx(%s: not in gzip format, file); @@ -1401,9 +1418,9 @@ } else zfd = STDOUT_FILENO; + switch (method) { #ifndef NO_BZIP2_SUPPORT - if (method == FT_BZIP2) { - + case FT_BZIP2: /* XXX */ if (lflag) { maybe_warnx(no -l with bzip2 files); @@ -1411,11 +1428,11 @@ } size = unbzip2(fd, zfd, NULL, 0, NULL); - } else + break; #endif #ifndef NO_COMPRESS_SUPPORT - if (method == FT_Z) { + case FT_Z: { FILE *in, *out; /* XXX */ @@ -1448,30 +1465,42 @@ unlink(outfile); goto lose; } - } else + break; + } #endif #ifndef NO_PACK_SUPPORT - if (method == FT_PACK) { + case FT_PACK: if (lflag) { maybe_warnx(no -l with packed files); goto lose; } size = unpack(fd, zfd, NULL, 0, NULL); - } else + break; +#endif + +#ifndef NO_XZ_SUPPORT + case FT_XZ: + if (lflag) { + maybe_warnx(no -l with xz files); + goto lose; + } + + size = unxz(fd, zfd, NULL, 0, NULL); + break; #endif #ifndef SMALL - if (method == FT_UNKNOWN) { + case FT_UNKNOWN: if (lflag) { maybe_warnx(no -l for unknown filetypes); goto lose; } size = cat_fd(NULL, 0, NULL, fd); - } else + break; #endif - { + default: if (lflag) { print_list(fd, isb.st_size, outfile, isb.st_mtime); close(fd); @@ -1479,6 +1508,7 @@ } size = gz_uncompress(fd, zfd, NULL, 0, NULL, file); + break; } if (close(fd) != 0) @@ -1661,6 +1691,12 @@ (char *)header1, sizeof header1, gsize); break; #endif +#ifndef NO_XZ_SUPPORT + case FT_XZ: + usize = unxz(STDIN_FILENO, STDOUT_FILENO, + (char *)header1, sizeof header1, gsize); + break; +#endif } #ifndef SMALL @@ -2037,6 +2073,9 @@ #ifndef NO_PACK_SUPPORT #include unpack.c #endif +#ifndef NO_XZ_SUPPORT +#include unxz.c +#endif static ssize_t read_retry(int fd, void *buf, size_t sz) Added files: Index: src/usr.bin/gzip/unxz.c diff -u /dev/null src/usr.bin/gzip/unxz.c:1.1 --- /dev/null Sat Jun 18 20:43:55 2011 +++ src/usr.bin/gzip/unxz.c Sat Jun 18 20:43:54 2011 @@ -0,0 +1,113 @@ + +#include stdarg.h +#include errno.h +#include stdio.h +#include unistd.h +#include
CVS commit: src/bin/pax
Module Name:src Committed By: christos Date: Sun Jun 19 00:55:09 UTC 2011 Modified Files: src/bin/pax: cpio.1 pax.1 tar.1 Log Message: document --xz To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/bin/pax/cpio.1 cvs rdiff -u -r1.59 -r1.60 src/bin/pax/pax.1 cvs rdiff -u -r1.30 -r1.31 src/bin/pax/tar.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/pax/cpio.1 diff -u src/bin/pax/cpio.1:1.11 src/bin/pax/cpio.1:1.12 --- src/bin/pax/cpio.1:1.11 Sun Dec 2 16:16:02 2007 +++ src/bin/pax/cpio.1 Sat Jun 18 20:55:09 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: cpio.1,v 1.11 2007/12/02 21:16:02 wiz Exp $ +.\ $NetBSD: cpio.1,v 1.12 2011/06/19 00:55:09 christos Exp $ .\ .\ Copyright (c) 1997 SigmaSoft, Th. Lockert .\ All rights reserved. @@ -120,9 +120,13 @@ Be verbose about operations. List filenames as they are written to the archive. .It Fl z -Compress archive using +Compress/decompress archive using .Xr gzip 1 format. +.It Fl -xz +Compress/decompress archive using +.Xr xz 1 +format. .It Fl Z Compress archive using .Xr compress 1 Index: src/bin/pax/pax.1 diff -u src/bin/pax/pax.1:1.59 src/bin/pax/pax.1:1.60 --- src/bin/pax/pax.1:1.59 Sat Jun 19 07:16:31 2010 +++ src/bin/pax/pax.1 Sat Jun 18 20:55:09 2011 @@ -1,4 +1,4 @@ -.\$NetBSD: pax.1,v 1.59 2010/06/19 11:16:31 wiz Exp $ +.\$NetBSD: pax.1,v 1.60 2011/06/19 00:55:09 christos Exp $ .\ .\ Copyright (c) 1992 Keith Muller. .\ Copyright (c) 1992, 1993 @@ -33,7 +33,7 @@ .\ .\ @(#)pax.1 8.4 (Berkeley) 4/18/94 .\ -.Dd June 18, 2010 +.Dd June 18, 2011 .Dt PAX 1 .Os .Sh NAME @@ -744,6 +744,10 @@ Use .Xr gzip 1 compression, when reading or writing archive files. +.It Fl -xz +Use +.Xr xz 1 +compression, when reading or writing archive files. .It Fl A Do not strip leading `/'s from file names. .It Fl B Ar bytes Index: src/bin/pax/tar.1 diff -u src/bin/pax/tar.1:1.30 src/bin/pax/tar.1:1.31 --- src/bin/pax/tar.1:1.30 Mon Apr 5 12:16:53 2010 +++ src/bin/pax/tar.1 Sat Jun 18 20:55:09 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: tar.1,v 1.30 2010/04/05 16:16:53 joerg Exp $ +.\ $NetBSD: tar.1,v 1.31 2011/06/19 00:55:09 christos Exp $ .\ .\ Copyright (c) 1996 SigmaSoft, Th. Lockert .\ All rights reserved. @@ -25,7 +25,7 @@ .\ .\ OpenBSD: tar.1,v 1.28 2000/11/09 23:58:56 aaron Exp .\ -.Dd March 23, 2010 +.Dd June 18, 2011 .Dt TAR 1 .Os .Sh NAME @@ -209,8 +209,12 @@ .Nm to prompt the user for the filename to use when storing or extracting files in an archive. +.It Fl -xz +Compress/decompress archive using +.Xr xz 1 . .It Fl z , -gzip , -gunzip -Compress archive using gzip. +Compress/decompress archive using +.Xr gzip 1 . .It Fl B , -read-full-blocks Reassemble small reads into full blocks (For reading from 4.2BSD pipes). .It Fl C Ar directory , Fl -directory Ar directory
CVS commit: src/usr.bin/gzip
Module Name:src Committed By: tsutsui Date: Sun Jun 19 01:20:19 UTC 2011 Modified Files: src/usr.bin/gzip: gzip.c Log Message: XZ_SUPPORT requires maybe_errx(). To generate a diff of this commit: cvs rdiff -u -r1.100 -r1.101 src/usr.bin/gzip/gzip.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/gzip/gzip.c diff -u src/usr.bin/gzip/gzip.c:1.100 src/usr.bin/gzip/gzip.c:1.101 --- src/usr.bin/gzip/gzip.c:1.100 Sun Jun 19 00:43:54 2011 +++ src/usr.bin/gzip/gzip.c Sun Jun 19 01:20:19 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: gzip.c,v 1.100 2011/06/19 00:43:54 christos Exp $ */ +/* $NetBSD: gzip.c,v 1.101 2011/06/19 01:20:19 tsutsui Exp $ */ /* * Copyright (c) 1997, 1998, 2003, 2004, 2006 Matthew R. Green @@ -30,7 +30,7 @@ #ifndef lint __COPYRIGHT(@(#) Copyright (c) 1997, 1998, 2003, 2004, 2006\ Matthew R. Green. All rights reserved.); -__RCSID($NetBSD: gzip.c,v 1.100 2011/06/19 00:43:54 christos Exp $); +__RCSID($NetBSD: gzip.c,v 1.101 2011/06/19 01:20:19 tsutsui Exp $); #endif /* not lint */ /* @@ -184,7 +184,8 @@ static void maybe_err(const char *fmt, ...) __attribute__((__format__(__printf__, 1, 2))); -#if !defined(NO_BZIP2_SUPPORT) || !defined(NO_PACK_SUPPORT) +#if !defined(NO_BZIP2_SUPPORT) || !defined(NO_PACK_SUPPORT) || \ +!defined(NO_XZ_SUPPORT) static void maybe_errx(const char *fmt, ...) __attribute__((__format__(__printf__, 1, 2))); #endif @@ -440,7 +441,8 @@ exit(2); } -#if !defined(NO_BZIP2_SUPPORT) || !defined(NO_PACK_SUPPORT) +#if !defined(NO_BZIP2_SUPPORT) || !defined(NO_PACK_SUPPORT) || \ +!defined(NO_XZ_SUPPORT) /* ... without an errno. */ void maybe_errx(const char *fmt, ...)
CVS commit: src/distrib/utils/x_gzip
Module Name:src Committed By: tsutsui Date: Sun Jun 19 01:25:35 UTC 2011 Modified Files: src/distrib/utils/x_gzip: Makefile Log Message: Add -DNO_PACK_SUPPORT and -DNO_XZ_SUPPORT to CPPFLAGS to omit extra algorithm not used in installer. XXX: should we use positive options in usr.bin/gzip/Makefile? To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/distrib/utils/x_gzip/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/utils/x_gzip/Makefile diff -u src/distrib/utils/x_gzip/Makefile:1.7 src/distrib/utils/x_gzip/Makefile:1.8 --- src/distrib/utils/x_gzip/Makefile:1.7 Sun Mar 28 04:10:43 2004 +++ src/distrib/utils/x_gzip/Makefile Sun Jun 19 01:25:35 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2004/03/28 04:10:43 mrg Exp $ +# $NetBSD: Makefile,v 1.8 2011/06/19 01:25:35 tsutsui Exp $ # Build a tiny limited gzip (i.e. for tiny boot media) SRCDIR= ${.CURDIR}/../../../usr.bin/gzip @@ -6,7 +6,11 @@ PROG= gzip NOMAN= # defined -CPPFLAGS+= -DSMALL -DNO_BZIP2_SUPPORT -DNO_COMPRESS_SUPPORT +CPPFLAGS+= -DSMALL +CPPFLAGS+= -DNO_BZIP2_SUPPORT +CPPFLAGS+= -DNO_COMPRESS_SUPPORT +CPPFLAGS+= -DNO_PACK_SUPPORT +CPPFLAGS+= -DNO_XZ_SUPPORT DPADD= ${LIBZ} LDADD= -lz
CVS commit: src/usr.bin/gzip
Module Name:src Committed By: christos Date: Sun Jun 19 01:52:28 UTC 2011 Modified Files: src/usr.bin/gzip: unxz.c Log Message: - remove unused call - read headers separately - print error id. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.bin/gzip/unxz.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/gzip/unxz.c diff -u src/usr.bin/gzip/unxz.c:1.1 src/usr.bin/gzip/unxz.c:1.2 --- src/usr.bin/gzip/unxz.c:1.1 Sat Jun 18 20:43:54 2011 +++ src/usr.bin/gzip/unxz.c Sat Jun 18 21:52:28 2011 @@ -9,33 +9,29 @@ unxz(int i, int o, char *pre, size_t prelen, off_t *bytes_in) { lzma_stream strm = LZMA_STREAM_INIT; + static const int flags = LZMA_TELL_UNSUPPORTED_CHECK|LZMA_CONCATENATED; lzma_ret ret; off_t x = 0; - - // Initialize the decoder - ret = lzma_alone_decoder(strm, UINT64_MAX); - if (ret != LZMA_OK) { - errno = ret == LZMA_MEM_ERROR ? ENOMEM : EINVAL; - maybe_errx(Cannot initialize decoder); - } - - // Input and output buffers uint8_t ibuf[BUFSIZ]; uint8_t obuf[BUFSIZ]; - *bytes_in = prelen; strm.next_in = ibuf; + memcpy(ibuf, pre, prelen); strm.avail_in = read(i, ibuf + prelen, sizeof(ibuf) - prelen); if (strm.avail_in == (size_t)-1) maybe_errx(Read failed); + *bytes_in = prelen + strm.avail_in; - memcpy(ibuf, pre, prelen); - *bytes_in += strm.avail_in; + if ((ret = lzma_stream_decoder(strm, UINT64_MAX, flags)) != LZMA_OK) + maybe_errx(Can't initialize decoder (%d), ret); + + strm.next_out = NULL; + strm.avail_out = 0; + if ((ret = lzma_code(strm, LZMA_RUN)) != LZMA_OK) + maybe_errx(Can't read headers (%d), ret); strm.next_out = obuf; strm.avail_out = sizeof(obuf); - if ((ret = lzma_stream_decoder(strm, UINT64_MAX, 0)) != LZMA_OK) - maybe_errx(Can't initialize decoder); for (;;) { if (strm.avail_in == 0) { @@ -101,13 +97,12 @@ msg = Reached memory limit; break; - default: -msg = Internal error (bug); +msg = Unknown error (%d); break; } - maybe_errx(%s, msg); + maybe_errx(msg, ret); } } }
CVS commit: src/rescue
Module Name:src Committed By: christos Date: Sun Jun 19 01:53:36 UTC 2011 Modified Files: src/rescue: list Log Message: add the lzma library now that is used by gzip To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/rescue/list Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/rescue/list diff -u src/rescue/list:1.40 src/rescue/list:1.41 --- src/rescue/list:1.40 Thu Jan 13 19:59:14 2011 +++ src/rescue/list Sat Jun 18 21:53:36 2011 @@ -1,4 +1,4 @@ -# $NetBSD: list,v 1.40 2011/01/14 00:59:14 njoly Exp $ +# $NetBSD: list,v 1.41 2011/06/19 01:53:36 christos Exp $ SRCDIRS bin @@ -148,4 +148,4 @@ PROG lfs_cleanerd LIBS liboverride.o -LIBS -lbz2 -lcrypt -ledit -lipsec -lkvm -ll -lm -lrmt -lcurses -lterminfo -lutil -lz -levent -lprop +LIBS -lbz2 -llzma -lcrypt -ledit -lipsec -lkvm -ll -lm -lrmt -lcurses -lterminfo -lutil -lz -levent -lprop
CVS commit: src/distrib
Module Name:src Committed By: tsutsui Date: Sun Jun 19 02:18:31 UTC 2011 Modified Files: src/distrib/acorn26/instkernel: list src/distrib/acorn32/ramdisk: list src/distrib/amd64/ramdisks/common: list.ramdisk src/distrib/cats/ramdisk: list src/distrib/emips/ramdisk: list src/distrib/evbarm/instkernel/ramdisk: list src/distrib/evbmips/instkernel/ramdisk: list src/distrib/evbsh3/instkernel/ramdisk: list src/distrib/landisk/ramdisk: list src/distrib/mipsco/ramdisk: list src/distrib/ofppc/ramdisks/ramdisk: list src/distrib/pmax/ramdisk: list src/distrib/sgimips/ramdisk: list src/distrib/shark/instkernel/ramdisk: list src/distrib/sparc64/instfs: list src/distrib/sun2/miniroot: list src/distrib/sun3/miniroot: list src/distrib/vax/ramdisk: list Log Message: Use src/distrib/utils/x_gzip in all install ramdisks/miniroots for now since installation file systems might be flooded by -llzma. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/distrib/acorn26/instkernel/list cvs rdiff -u -r1.24 -r1.25 src/distrib/acorn32/ramdisk/list cvs rdiff -u -r1.13 -r1.14 src/distrib/amd64/ramdisks/common/list.ramdisk cvs rdiff -u -r1.21 -r1.22 src/distrib/cats/ramdisk/list cvs rdiff -u -r1.1 -r1.2 src/distrib/emips/ramdisk/list cvs rdiff -u -r1.18 -r1.19 src/distrib/evbarm/instkernel/ramdisk/list cvs rdiff -u -r1.13 -r1.14 src/distrib/evbmips/instkernel/ramdisk/list cvs rdiff -u -r1.2 -r1.3 src/distrib/evbsh3/instkernel/ramdisk/list cvs rdiff -u -r1.17 -r1.18 src/distrib/landisk/ramdisk/list cvs rdiff -u -r1.17 -r1.18 src/distrib/mipsco/ramdisk/list cvs rdiff -u -r1.6 -r1.7 src/distrib/ofppc/ramdisks/ramdisk/list cvs rdiff -u -r1.28 -r1.29 src/distrib/pmax/ramdisk/list cvs rdiff -u -r1.18 -r1.19 src/distrib/sgimips/ramdisk/list cvs rdiff -u -r1.21 -r1.22 src/distrib/shark/instkernel/ramdisk/list cvs rdiff -u -r1.20 -r1.21 src/distrib/sparc64/instfs/list cvs rdiff -u -r1.17 -r1.18 src/distrib/sun2/miniroot/list cvs rdiff -u -r1.26 -r1.27 src/distrib/sun3/miniroot/list cvs rdiff -u -r1.25 -r1.26 src/distrib/vax/ramdisk/list Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/acorn26/instkernel/list diff -u src/distrib/acorn26/instkernel/list:1.17 src/distrib/acorn26/instkernel/list:1.18 --- src/distrib/acorn26/instkernel/list:1.17 Fri Jan 14 10:26:28 2011 +++ src/distrib/acorn26/instkernel/list Sun Jun 19 02:18:28 2011 @@ -1,4 +1,4 @@ -# $NetBSD: list,v 1.17 2011/01/14 10:26:28 tsutsui Exp $ +# $NetBSD: list,v 1.18 2011/06/19 02:18:28 tsutsui Exp $ SRCDIRS bin sbin usr.bin/less usr.bin usr.sbin gnu/usr.bin @@ -51,9 +51,10 @@ PROG usr/sbin/chroot +SPECIAL gzip srcdir distrib/utils/x_gzip SPECIAL ping srcdir distrib/utils/x_ping -LIBS libhack.o -lbz2 -ledit -lutil -lcurses -lterminfo -lrmt -lcrypt -ll -lm -lz -lprop +LIBS libhack.o -ledit -lutil -lcurses -lterminfo -lrmt -lcrypt -ll -lm -lz -lprop # init invokes the shell as -sh ARGVLN sh -sh Index: src/distrib/acorn32/ramdisk/list diff -u src/distrib/acorn32/ramdisk/list:1.24 src/distrib/acorn32/ramdisk/list:1.25 --- src/distrib/acorn32/ramdisk/list:1.24 Fri Jan 14 10:26:29 2011 +++ src/distrib/acorn32/ramdisk/list Sun Jun 19 02:18:29 2011 @@ -1,4 +1,4 @@ -# $NetBSD: list,v 1.24 2011/01/14 10:26:29 tsutsui Exp $ +# $NetBSD: list,v 1.25 2011/06/19 02:18:29 tsutsui Exp $ SRCDIRS bin sbin usr.bin/less usr.bin usr.sbin gnu/usr.bin @@ -54,9 +54,10 @@ # init invokes the shell as -sh ARGVLN sh -sh +SPECIAL gzip srcdir distrib/utils/x_gzip SPECIAL ping srcdir distrib/utils/x_ping -LIBS -lbz2 -ledit -lutil -lcurses -lterminfo -lrmt -lcrypt -ll -lm -lz -lprop +LIBS -ledit -lutil -lcurses -lterminfo -lrmt -lcrypt -ll -lm -lz -lprop # we need the boot blocks /usr/mdec #COPYDIR ${DESTDIR}/usr/mdec usr/mdec Index: src/distrib/amd64/ramdisks/common/list.ramdisk diff -u src/distrib/amd64/ramdisks/common/list.ramdisk:1.13 src/distrib/amd64/ramdisks/common/list.ramdisk:1.14 --- src/distrib/amd64/ramdisks/common/list.ramdisk:1.13 Sun Feb 13 04:14:58 2011 +++ src/distrib/amd64/ramdisks/common/list.ramdisk Sun Jun 19 02:18:30 2011 @@ -1,4 +1,4 @@ -# $NetBSD: list.ramdisk,v 1.13 2011/02/13 04:14:58 jym Exp $ +# $NetBSD: list.ramdisk,v 1.14 2011/06/19 02:18:30 tsutsui Exp $ SRCDIRS usr.bin/less SRCDIRS bin sbin usr.bin usr.sbin libexec @@ -53,6 +53,7 @@ PROG usr/sbin/chroot +SPECIAL gzip srcdir distrib/utils/x_gzip SPECIAL ifconfig srcdir distrib/utils/x_ifconfig SPECIAL ping srcdir distrib/utils/x_ping SPECIAL route srcdir distrib/utils/x_route @@ -62,7 +63,7 @@ ARGVLN sh -sh # libhack.o is built by Makefile included Makefile.inc -LIBS libhack.o -lbz2 -ledit -lutil -lcurses -lterminfo -lrmt -lcrypt -ll -lm -lz -lprop +LIBS libhack.o -ledit -lutil -lcurses -lterminfo -lrmt -lcrypt
CVS commit: src/usr.bin/gzip
Module Name:src Committed By: christos Date: Sun Jun 19 02:19:09 UTC 2011 Modified Files: src/usr.bin/gzip: gzip.c Log Message: recognize .xz suffix To generate a diff of this commit: cvs rdiff -u -r1.101 -r1.102 src/usr.bin/gzip/gzip.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/gzip/gzip.c diff -u src/usr.bin/gzip/gzip.c:1.101 src/usr.bin/gzip/gzip.c:1.102 --- src/usr.bin/gzip/gzip.c:1.101 Sat Jun 18 21:20:19 2011 +++ src/usr.bin/gzip/gzip.c Sat Jun 18 22:19:09 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: gzip.c,v 1.101 2011/06/19 01:20:19 tsutsui Exp $ */ +/* $NetBSD: gzip.c,v 1.102 2011/06/19 02:19:09 christos Exp $ */ /* * Copyright (c) 1997, 1998, 2003, 2004, 2006 Matthew R. Green @@ -30,7 +30,7 @@ #ifndef lint __COPYRIGHT(@(#) Copyright (c) 1997, 1998, 2003, 2004, 2006\ Matthew R. Green. All rights reserved.); -__RCSID($NetBSD: gzip.c,v 1.101 2011/06/19 01:20:19 tsutsui Exp $); +__RCSID($NetBSD: gzip.c,v 1.102 2011/06/19 02:19:09 christos Exp $); #endif /* not lint */ /* @@ -150,6 +150,9 @@ #ifndef NO_COMPRESS_SUPPORT SUFFIX(Z_SUFFIX, ), #endif +#ifndef NO_XZ_SUPPORT + SUFFIX(XZ_SUFFIX, ), +#endif SUFFIX(GZ_SUFFIX, ), /* Overwritten by -S */ #endif /* SMALL */ #undef SUFFIX
CVS commit: src/distrib/amd64/ramdisks/common
Module Name:src Committed By: tsutsui Date: Sun Jun 19 02:19:34 UTC 2011 Modified Files: src/distrib/amd64/ramdisks/common: list.ramdisk Log Message: Fix indent. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/distrib/amd64/ramdisks/common/list.ramdisk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/amd64/ramdisks/common/list.ramdisk diff -u src/distrib/amd64/ramdisks/common/list.ramdisk:1.14 src/distrib/amd64/ramdisks/common/list.ramdisk:1.15 --- src/distrib/amd64/ramdisks/common/list.ramdisk:1.14 Sun Jun 19 02:18:30 2011 +++ src/distrib/amd64/ramdisks/common/list.ramdisk Sun Jun 19 02:19:34 2011 @@ -1,4 +1,4 @@ -# $NetBSD: list.ramdisk,v 1.14 2011/06/19 02:18:30 tsutsui Exp $ +# $NetBSD: list.ramdisk,v 1.15 2011/06/19 02:19:34 tsutsui Exp $ SRCDIRS usr.bin/less SRCDIRS bin sbin usr.bin usr.sbin libexec @@ -69,7 +69,7 @@ COPY ${NETBSDSRCDIR}/etc/group etc/group COPY ${NETBSDSRCDIR}/etc/master.passwd etc/master.passwd COPY ${NETBSDSRCDIR}/etc/netconfig etc/netconfig -COPY ${DISTRIBDIR}/common/protocols etc/protocols +COPY ${DISTRIBDIR}/common/protocols etc/protocols COPY ${DISTRIBDIR}/common/services etc/services # we need the boot block in /usr/mdec + the MBR copy
CVS commit: src/usr.bin/gzip
Module Name:src Committed By: christos Date: Sun Jun 19 02:19:45 UTC 2011 Modified Files: src/usr.bin/gzip: unxz.c Log Message: make this work: - forgot to account for prelen in the input length - deal with EOF properly To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.bin/gzip/unxz.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/gzip/unxz.c diff -u src/usr.bin/gzip/unxz.c:1.2 src/usr.bin/gzip/unxz.c:1.3 --- src/usr.bin/gzip/unxz.c:1.2 Sat Jun 18 21:52:28 2011 +++ src/usr.bin/gzip/unxz.c Sat Jun 18 22:19:45 2011 @@ -11,16 +11,21 @@ lzma_stream strm = LZMA_STREAM_INIT; static const int flags = LZMA_TELL_UNSUPPORTED_CHECK|LZMA_CONCATENATED; lzma_ret ret; - off_t x = 0; + lzma_action action = LZMA_RUN; + off_t bytes_out, bp; uint8_t ibuf[BUFSIZ]; uint8_t obuf[BUFSIZ]; + if (bytes_in == NULL) + bytes_in = bp; + strm.next_in = ibuf; memcpy(ibuf, pre, prelen); strm.avail_in = read(i, ibuf + prelen, sizeof(ibuf) - prelen); if (strm.avail_in == (size_t)-1) - maybe_errx(Read failed); - *bytes_in = prelen + strm.avail_in; + maybe_err(read failed); + strm.avail_in += prelen; + *bytes_in = strm.avail_in; if ((ret = lzma_stream_decoder(strm, UINT64_MAX, flags)) != LZMA_OK) maybe_errx(Can't initialize decoder (%d), ret); @@ -30,6 +35,7 @@ if ((ret = lzma_code(strm, LZMA_RUN)) != LZMA_OK) maybe_errx(Can't read headers (%d), ret); + bytes_out = 0; strm.next_out = obuf; strm.avail_out = sizeof(obuf); @@ -37,13 +43,20 @@ if (strm.avail_in == 0) { strm.next_in = ibuf; strm.avail_in = read(i, ibuf, sizeof(ibuf)); -// fprintf(stderr, read = %zu\n, strm.avail_in); - if (strm.avail_in == (size_t)-1) -maybe_errx(Read failed); + switch (strm.avail_in) { + case (size_t)-1: +maybe_err(read failed); +/*NOTREACHED*/ + case 0: +action = LZMA_FINISH; +break; + default: +*bytes_in += strm.avail_in; +break; + } } - ret = lzma_code(strm, LZMA_RUN); -// fprintf(stderr, ret = %d %zu %zu\n, ret, strm.avail_in, strm.avail_out); + ret = lzma_code(strm, action); // Write and check write error before checking decoder error. // This way as much data as possible gets written to output @@ -56,7 +69,7 @@ strm.next_out = obuf; strm.avail_out = sizeof(obuf); - x += write_size; + bytes_out += write_size; } if (ret != LZMA_OK) { @@ -66,7 +79,7 @@ ret = LZMA_DATA_ERROR; else { lzma_end(strm); - return x; + return bytes_out; } }
CVS commit: src/usr.bin/gzip
Module Name:src Committed By: christos Date: Sun Jun 19 02:22:37 UTC 2011 Modified Files: src/usr.bin/gzip: gzip.1 Log Message: cross reference xz.1 To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/usr.bin/gzip/gzip.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/gzip/gzip.1 diff -u src/usr.bin/gzip/gzip.1:1.20 src/usr.bin/gzip/gzip.1:1.21 --- src/usr.bin/gzip/gzip.1:1.20 Wed Apr 1 04:15:37 2009 +++ src/usr.bin/gzip/gzip.1 Sat Jun 18 22:22:36 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: gzip.1,v 1.20 2009/04/01 08:15:37 mrg Exp $ +.\ $NetBSD: gzip.1,v 1.21 2011/06/19 02:22:36 christos Exp $ .\ .\ Copyright (c) 1997, 2003, 2004 Matthew R. Green .\ All rights reserved. @@ -24,7 +24,7 @@ .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\ SUCH DAMAGE. .\ -.Dd April 1, 2009 +.Dd June 18, 2011 .Dt GZIP 1 .Os .Sh NAME @@ -171,6 +171,7 @@ .Sh SEE ALSO .Xr bzip2 1 , .Xr compress 1 , +.Xr xz 1 , .Xr fts 3 , .Xr zlib 3 .Sh HISTORY
CVS commit: src/distrib
Module Name:src Committed By: tsutsui Date: Sun Jun 19 02:25:46 UTC 2011 Modified Files: src/distrib/acorn26/instkernel: list src/distrib/acorn32/ramdisk: list src/distrib/cats/ramdisk: list src/distrib/emips/ramdisk: list src/distrib/evbarm/instkernel/ramdisk: list src/distrib/evbmips/instkernel/ramdisk: list src/distrib/evbsh3/instkernel/ramdisk: list src/distrib/mipsco/ramdisk: list src/distrib/pmax/ramdisk: list src/distrib/sgimips/ramdisk: list src/distrib/shark/instkernel/ramdisk: list src/distrib/sparc64/instfs: list src/distrib/vax/ramdisk: list Log Message: Remove unnecessary gnu/usr.bin path from SRCDIRS. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/distrib/acorn26/instkernel/list cvs rdiff -u -r1.25 -r1.26 src/distrib/acorn32/ramdisk/list cvs rdiff -u -r1.22 -r1.23 src/distrib/cats/ramdisk/list cvs rdiff -u -r1.2 -r1.3 src/distrib/emips/ramdisk/list cvs rdiff -u -r1.19 -r1.20 src/distrib/evbarm/instkernel/ramdisk/list cvs rdiff -u -r1.14 -r1.15 src/distrib/evbmips/instkernel/ramdisk/list cvs rdiff -u -r1.3 -r1.4 src/distrib/evbsh3/instkernel/ramdisk/list cvs rdiff -u -r1.18 -r1.19 src/distrib/mipsco/ramdisk/list cvs rdiff -u -r1.29 -r1.30 src/distrib/pmax/ramdisk/list cvs rdiff -u -r1.19 -r1.20 src/distrib/sgimips/ramdisk/list cvs rdiff -u -r1.22 -r1.23 src/distrib/shark/instkernel/ramdisk/list cvs rdiff -u -r1.21 -r1.22 src/distrib/sparc64/instfs/list cvs rdiff -u -r1.26 -r1.27 src/distrib/vax/ramdisk/list Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/acorn26/instkernel/list diff -u src/distrib/acorn26/instkernel/list:1.18 src/distrib/acorn26/instkernel/list:1.19 --- src/distrib/acorn26/instkernel/list:1.18 Sun Jun 19 02:18:28 2011 +++ src/distrib/acorn26/instkernel/list Sun Jun 19 02:25:45 2011 @@ -1,6 +1,6 @@ -# $NetBSD: list,v 1.18 2011/06/19 02:18:28 tsutsui Exp $ +# $NetBSD: list,v 1.19 2011/06/19 02:25:45 tsutsui Exp $ -SRCDIRS bin sbin usr.bin/less usr.bin usr.sbin gnu/usr.bin +SRCDIRS bin sbin usr.bin/less usr.bin usr.sbin PROG bin/cat PROG bin/chmod Index: src/distrib/acorn32/ramdisk/list diff -u src/distrib/acorn32/ramdisk/list:1.25 src/distrib/acorn32/ramdisk/list:1.26 --- src/distrib/acorn32/ramdisk/list:1.25 Sun Jun 19 02:18:29 2011 +++ src/distrib/acorn32/ramdisk/list Sun Jun 19 02:25:45 2011 @@ -1,6 +1,6 @@ -# $NetBSD: list,v 1.25 2011/06/19 02:18:29 tsutsui Exp $ +# $NetBSD: list,v 1.26 2011/06/19 02:25:45 tsutsui Exp $ -SRCDIRS bin sbin usr.bin/less usr.bin usr.sbin gnu/usr.bin +SRCDIRS bin sbin usr.bin/less usr.bin usr.sbin PROG bin/cat PROG bin/chmod Index: src/distrib/cats/ramdisk/list diff -u src/distrib/cats/ramdisk/list:1.22 src/distrib/cats/ramdisk/list:1.23 --- src/distrib/cats/ramdisk/list:1.22 Sun Jun 19 02:18:30 2011 +++ src/distrib/cats/ramdisk/list Sun Jun 19 02:25:45 2011 @@ -1,7 +1,7 @@ -# $NetBSD: list,v 1.22 2011/06/19 02:18:30 tsutsui Exp $ +# $NetBSD: list,v 1.23 2011/06/19 02:25:45 tsutsui Exp $ # usr.bin/less has to be first, otherwise the ramdisk.mk generation fails -SRCDIRS usr.bin/less bin sbin usr.bin usr.sbin gnu/usr.bin +SRCDIRS usr.bin/less bin sbin usr.bin usr.sbin PROG bin/cat #PROG bin/chio Index: src/distrib/emips/ramdisk/list diff -u src/distrib/emips/ramdisk/list:1.2 src/distrib/emips/ramdisk/list:1.3 --- src/distrib/emips/ramdisk/list:1.2 Sun Jun 19 02:18:31 2011 +++ src/distrib/emips/ramdisk/list Sun Jun 19 02:25:46 2011 @@ -1,6 +1,6 @@ -# $NetBSD: list,v 1.2 2011/06/19 02:18:31 tsutsui Exp $ +# $NetBSD: list,v 1.3 2011/06/19 02:25:46 tsutsui Exp $ -SRCDIRS bin sbin usr.bin usr.sbin gnu/usr.bin sys/arch/emips/stand +SRCDIRS bin sbin usr.bin usr.sbin sys/arch/emips/stand PROG bin/cat PROG bin/chmod Index: src/distrib/evbarm/instkernel/ramdisk/list diff -u src/distrib/evbarm/instkernel/ramdisk/list:1.19 src/distrib/evbarm/instkernel/ramdisk/list:1.20 --- src/distrib/evbarm/instkernel/ramdisk/list:1.19 Sun Jun 19 02:18:30 2011 +++ src/distrib/evbarm/instkernel/ramdisk/list Sun Jun 19 02:25:46 2011 @@ -1,6 +1,6 @@ -# $NetBSD: list,v 1.19 2011/06/19 02:18:30 tsutsui Exp $ +# $NetBSD: list,v 1.20 2011/06/19 02:25:46 tsutsui Exp $ -SRCDIRS bin sbin usr.bin/less usr.bin usr.sbin gnu/usr.bin +SRCDIRS bin sbin usr.bin/less usr.bin usr.sbin PROG bin/cat PROG bin/chmod Index: src/distrib/evbmips/instkernel/ramdisk/list diff -u src/distrib/evbmips/instkernel/ramdisk/list:1.14 src/distrib/evbmips/instkernel/ramdisk/list:1.15 --- src/distrib/evbmips/instkernel/ramdisk/list:1.14 Sun Jun 19 02:18:30 2011 +++ src/distrib/evbmips/instkernel/ramdisk/list Sun Jun 19 02:25:46 2011 @@ -1,6 +1,6 @@ -# $NetBSD: list,v 1.14 2011/06/19 02:18:30 tsutsui Exp $ +# $NetBSD: list,v 1.15 2011/06/19 02:25:46 tsutsui Exp $ -SRCDIRS bin sbin usr.bin/less usr.bin usr.sbin gnu/usr.bin +SRCDIRS bin
CVS commit: src/distrib
Module Name:src Committed By: tsutsui Date: Sun Jun 19 02:27:41 UTC 2011 Modified Files: src/distrib/acorn26/instkernel: list src/distrib/acorn32/ramdisk: list src/distrib/sparc64/instfs: list Log Message: Fix indent. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/distrib/acorn26/instkernel/list cvs rdiff -u -r1.26 -r1.27 src/distrib/acorn32/ramdisk/list cvs rdiff -u -r1.22 -r1.23 src/distrib/sparc64/instfs/list Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/acorn26/instkernel/list diff -u src/distrib/acorn26/instkernel/list:1.19 src/distrib/acorn26/instkernel/list:1.20 --- src/distrib/acorn26/instkernel/list:1.19 Sun Jun 19 02:25:45 2011 +++ src/distrib/acorn26/instkernel/list Sun Jun 19 02:27:41 2011 @@ -1,4 +1,4 @@ -# $NetBSD: list,v 1.19 2011/06/19 02:25:45 tsutsui Exp $ +# $NetBSD: list,v 1.20 2011/06/19 02:27:41 tsutsui Exp $ SRCDIRS bin sbin usr.bin/less usr.bin usr.sbin @@ -66,7 +66,7 @@ COPY ${NETBSDSRCDIR}/etc/group etc/group COPY ${NETBSDSRCDIR}/etc/master.passwd etc/master.passwd COPY ${NETBSDSRCDIR}/etc/netconfig etc/netconfig -COPY ${DISTRIBDIR}/common/protocols etc/protocols +COPY ${DISTRIBDIR}/common/protocols etc/protocols COPY ${DISTRIBDIR}/common/services etc/services # and the installation tools Index: src/distrib/acorn32/ramdisk/list diff -u src/distrib/acorn32/ramdisk/list:1.26 src/distrib/acorn32/ramdisk/list:1.27 --- src/distrib/acorn32/ramdisk/list:1.26 Sun Jun 19 02:25:45 2011 +++ src/distrib/acorn32/ramdisk/list Sun Jun 19 02:27:41 2011 @@ -1,4 +1,4 @@ -# $NetBSD: list,v 1.26 2011/06/19 02:25:45 tsutsui Exp $ +# $NetBSD: list,v 1.27 2011/06/19 02:27:41 tsutsui Exp $ SRCDIRS bin sbin usr.bin/less usr.bin usr.sbin @@ -66,7 +66,7 @@ COPY ${NETBSDSRCDIR}/etc/group etc/group COPY ${NETBSDSRCDIR}/etc/master.passwd etc/master.passwd COPY ${NETBSDSRCDIR}/etc/netconfig etc/netconfig -COPY ${DISTRIBDIR}/common/protocols etc/protocols +COPY ${DISTRIBDIR}/common/protocols etc/protocols COPY ${DISTRIBDIR}/common/services etc/services #COPY ${CURDIR}/inst.sh usr/local/sbin/inst 555 Index: src/distrib/sparc64/instfs/list diff -u src/distrib/sparc64/instfs/list:1.22 src/distrib/sparc64/instfs/list:1.23 --- src/distrib/sparc64/instfs/list:1.22 Sun Jun 19 02:25:45 2011 +++ src/distrib/sparc64/instfs/list Sun Jun 19 02:27:41 2011 @@ -1,4 +1,4 @@ -# $NetBSD: list,v 1.22 2011/06/19 02:25:45 tsutsui Exp $ +# $NetBSD: list,v 1.23 2011/06/19 02:27:41 tsutsui Exp $ SRCDIRS bin sbin libexec usr.bin/less usr.bin usr.sbin @@ -83,7 +83,7 @@ COPY ${NETBSDSRCDIR}/etc/group etc/group COPY ${NETBSDSRCDIR}/etc/master.passwd etc/master.passwd COPY ${NETBSDSRCDIR}/etc/netconfig etc/netconfig -COPY ${DISTRIBDIR}/common/protocols etc/protocols +COPY ${DISTRIBDIR}/common/protocols etc/protocols COPY ${DISTRIBDIR}/common/services etc/services COPY ${DESTDIR}/usr/share/misc/terminfo.db usr/share/misc/terminfo.db
CVS commit: src/distrib/evbsh3/instkernel/ramdisk
Module Name:src Committed By: tsutsui Date: Sun Jun 19 02:28:35 UTC 2011 Modified Files: src/distrib/evbsh3/instkernel/ramdisk: list Log Message: Use ${DISTRIBDIR}. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/distrib/evbsh3/instkernel/ramdisk/list Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/evbsh3/instkernel/ramdisk/list diff -u src/distrib/evbsh3/instkernel/ramdisk/list:1.4 src/distrib/evbsh3/instkernel/ramdisk/list:1.5 --- src/distrib/evbsh3/instkernel/ramdisk/list:1.4 Sun Jun 19 02:25:45 2011 +++ src/distrib/evbsh3/instkernel/ramdisk/list Sun Jun 19 02:28:35 2011 @@ -1,4 +1,4 @@ -# $NetBSD: list,v 1.4 2011/06/19 02:25:45 tsutsui Exp $ +# $NetBSD: list,v 1.5 2011/06/19 02:28:35 tsutsui Exp $ SRCDIRS bin sbin usr.bin/less usr.bin usr.sbin @@ -70,8 +70,8 @@ COPY ${NETBSDSRCDIR}/etc/group etc/group COPY ${NETBSDSRCDIR}/etc/master.passwd etc/master.passwd COPY ${NETBSDSRCDIR}/etc/netconfig etc/netconfig -COPY ${NETBSDSRCDIR}/distrib/common/protocols etc/protocols -COPY ${NETBSDSRCDIR}/distrib/common/services etc/services +COPY ${DISTRIBDIR}/common/protocols etc/protocols +COPY ${DISTRIBDIR}/common/services etc/services # the disktab explanation file COPY ${CURDIR}/disktab.preinstall etc/disktab.preinstall
CVS commit: src/distrib
Module Name:src Committed By: tsutsui Date: Sun Jun 19 02:36:59 UTC 2011 Modified Files: src/distrib/alpha/instkernel/ramdisk: list src/distrib/miniroot: list Log Message: Use src/distrib/utils/x_gzip in all install ramdisks/miniroots for now since installation file systems might be flooded by -llzma. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/distrib/alpha/instkernel/ramdisk/list cvs rdiff -u -r1.32 -r1.33 src/distrib/miniroot/list Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/alpha/instkernel/ramdisk/list diff -u src/distrib/alpha/instkernel/ramdisk/list:1.38 src/distrib/alpha/instkernel/ramdisk/list:1.39 --- src/distrib/alpha/instkernel/ramdisk/list:1.38 Fri Jan 14 10:26:29 2011 +++ src/distrib/alpha/instkernel/ramdisk/list Sun Jun 19 02:36:59 2011 @@ -1,4 +1,4 @@ -# $NetBSD: list,v 1.38 2011/01/14 10:26:29 tsutsui Exp $ +# $NetBSD: list,v 1.39 2011/06/19 02:36:59 tsutsui Exp $ SRCDIRS bin sbin usr.bin/less usr.bin usr.sbin @@ -57,9 +57,10 @@ # init invokes the shell as -sh ARGVLN sh -sh +SPECIAL ping srcdir distrib/utils/x_gzip SPECIAL ping srcdir distrib/utils/x_ping -LIBS -ledit -lbz2 -lutil -lcurses -lterminfo -lrmt -lcrypt -ll -lm -lz -lprop +LIBS -ledit -lutil -lcurses -lterminfo -lrmt -lcrypt -ll -lm -lz -lprop # we need the boot blocks /usr/mdec COPY ${DESTDIR}/usr/mdec/boot usr/mdec/boot Index: src/distrib/miniroot/list diff -u src/distrib/miniroot/list:1.32 src/distrib/miniroot/list:1.33 --- src/distrib/miniroot/list:1.32 Fri Jan 14 10:26:34 2011 +++ src/distrib/miniroot/list Sun Jun 19 02:36:59 2011 @@ -1,4 +1,4 @@ -# $NetBSD: list,v 1.32 2011/01/14 10:26:34 tsutsui Exp $ +# $NetBSD: list,v 1.33 2011/06/19 02:36:59 tsutsui Exp $ SRCDIRS bin sbin usr.bin usr.sbin gnu/usr.bin @@ -53,12 +53,13 @@ ARGVLN sh -sh SPECIAL ed srcdir distrib/utils/x_ed +SPECIAL gzip srcdir distrib/utils/x_gzip SPECIAL ifconfig srcdir distrib/utils/x_ifconfig SPECIAL ping srcdir distrib/utils/x_ping SPECIAL route srcdir distrib/utils/x_route LIBS libhack.o -LIBS -lrmt -lutil -lcurses -lterminfo -lbz2 -lcrypt -lintl -ll -lm -lkvm -lz -lprop +LIBS -lrmt -lutil -lcurses -lterminfo -lcrypt -lintl -ll -lm -lkvm -lz -lprop # various files that we need in /etc for the install COPY ${NETBSDSRCDIR}/etc/group etc/group
CVS commit: src/distrib/emips/ramdisk
Module Name:src Committed By: tsutsui Date: Sun Jun 19 02:40:38 UTC 2011 Modified Files: src/distrib/emips/ramdisk: dot.profile list Log Message: Use sbin/dmesg rather than via kernfs. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/distrib/emips/ramdisk/dot.profile cvs rdiff -u -r1.3 -r1.4 src/distrib/emips/ramdisk/list Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/emips/ramdisk/dot.profile diff -u src/distrib/emips/ramdisk/dot.profile:1.1 src/distrib/emips/ramdisk/dot.profile:1.2 --- src/distrib/emips/ramdisk/dot.profile:1.1 Wed Jan 26 01:18:44 2011 +++ src/distrib/emips/ramdisk/dot.profile Sun Jun 19 02:40:38 2011 @@ -1,4 +1,4 @@ -# $NetBSD: dot.profile,v 1.1 2011/01/26 01:18:44 pooka Exp $ +# $NetBSD: dot.profile,v 1.2 2011/06/19 02:40:38 tsutsui Exp $ # # Copyright (c) 1997 Perry E. Metzger # Copyright (c) 1994 Christopher G. Demetriou @@ -59,9 +59,6 @@ # mount the ramdisk read write mount -u $ROOTDEV / - # mount the kern_fs so that we can examine the dmesg state - mount -t kernfs /kern /kern - # run the installation program sysinst fi Index: src/distrib/emips/ramdisk/list diff -u src/distrib/emips/ramdisk/list:1.3 src/distrib/emips/ramdisk/list:1.4 --- src/distrib/emips/ramdisk/list:1.3 Sun Jun 19 02:25:46 2011 +++ src/distrib/emips/ramdisk/list Sun Jun 19 02:40:38 2011 @@ -1,4 +1,4 @@ -# $NetBSD: list,v 1.3 2011/06/19 02:25:46 tsutsui Exp $ +# $NetBSD: list,v 1.4 2011/06/19 02:40:38 tsutsui Exp $ SRCDIRS bin sbin usr.bin usr.sbin sys/arch/emips/stand @@ -20,6 +20,7 @@ PROG bin/stty PROG bin/sync +PROG sbin/dmesg PROG sbin/disklabel PROG sbin/fsck PROG sbin/fsck_ffs @@ -29,7 +30,6 @@ PROG sbin/mount PROG sbin/mount_cd9660 PROG sbin/mount_ffs -PROG sbin/mount_kernfs PROG sbin/mount_msdos PROG sbin/mount_nfs PROG sbin/newfs sbin/mount_mfs
CVS commit: src/sys
Module Name:src Committed By: rmind Date: Sun Jun 19 02:42:54 UTC 2011 Modified Files: src/sys/fs/nilfs: nilfs_vnops.c src/sys/nfs: nfs_bio.c src/sys/rump/librump/rumpvfs: rumpfs.c src/sys/ufs/ufs: ufs_readwrite.c src/sys/uvm: uvm_bio.c Log Message: - Fix a silly bug: remove umap from uobj in ubc_release() UBC_UNMAP case. - Use UBC_WANT_UNMAP() consistently. ARM (PMAP_CACHE_VIVT case) works again. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/fs/nilfs/nilfs_vnops.c cvs rdiff -u -r1.186 -r1.187 src/sys/nfs/nfs_bio.c cvs rdiff -u -r1.95 -r1.96 src/sys/rump/librump/rumpvfs/rumpfs.c cvs rdiff -u -r1.97 -r1.98 src/sys/ufs/ufs/ufs_readwrite.c cvs rdiff -u -r1.76 -r1.77 src/sys/uvm/uvm_bio.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/fs/nilfs/nilfs_vnops.c diff -u src/sys/fs/nilfs/nilfs_vnops.c:1.12 src/sys/fs/nilfs/nilfs_vnops.c:1.13 --- src/sys/fs/nilfs/nilfs_vnops.c:1.12 Sun Jun 12 03:35:53 2011 +++ src/sys/fs/nilfs/nilfs_vnops.c Sun Jun 19 02:42:53 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: nilfs_vnops.c,v 1.12 2011/06/12 03:35:53 rmind Exp $ */ +/* $NetBSD: nilfs_vnops.c,v 1.13 2011/06/19 02:42:53 rmind Exp $ */ /* * Copyright (c) 2008, 2009 Reinoud Zandijk @@ -28,7 +28,7 @@ #include sys/cdefs.h #ifndef lint -__KERNEL_RCSID(0, $NetBSD: nilfs_vnops.c,v 1.12 2011/06/12 03:35:53 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: nilfs_vnops.c,v 1.13 2011/06/19 02:42:53 rmind Exp $); #endif /* not lint */ @@ -144,7 +144,6 @@ uint64_t file_size; vsize_t len; int error; - int flags; DPRINTF(READ, (nilfs_read called\n)); @@ -168,7 +167,6 @@ /* read contents using buffercache */ uobj = vp-v_uobj; - flags = UBC_WANT_UNMAP(vp) ? UBC_UNMAP : 0; error = 0; while (uio-uio_resid 0) { /* reached end? */ @@ -216,8 +214,7 @@ struct nilfs_node *nilfs_node = VTOI(vp); uint64_t file_size, old_size; vsize_t len; - int error; - int flags, resid, extended; + int error, resid, extended; DPRINTF(WRITE, (nilfs_write called\n)); @@ -263,7 +260,6 @@ /* write contents using buffercache */ uobj = vp-v_uobj; - flags = UBC_WANT_UNMAP(vp) ? UBC_UNMAP : 0; resid = uio-uio_resid; error = 0; Index: src/sys/nfs/nfs_bio.c diff -u src/sys/nfs/nfs_bio.c:1.186 src/sys/nfs/nfs_bio.c:1.187 --- src/sys/nfs/nfs_bio.c:1.186 Sun Jun 12 03:35:59 2011 +++ src/sys/nfs/nfs_bio.c Sun Jun 19 02:42:53 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: nfs_bio.c,v 1.186 2011/06/12 03:35:59 rmind Exp $ */ +/* $NetBSD: nfs_bio.c,v 1.187 2011/06/19 02:42:53 rmind Exp $ */ /* * Copyright (c) 1989, 1993 @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: nfs_bio.c,v 1.186 2011/06/12 03:35:59 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: nfs_bio.c,v 1.187 2011/06/19 02:42:53 rmind Exp $); #ifdef _KERNEL_OPT #include opt_nfs.h @@ -157,9 +157,8 @@ } bytelen = MIN(np-n_size - uio-uio_offset, uio-uio_resid); - error = ubc_uiomove(vp-v_uobj, uio, bytelen, - advice, UBC_READ | UBC_PARTIALOK | - (UBC_WANT_UNMAP(vp) ? UBC_UNMAP : 0)); + error = ubc_uiomove(vp-v_uobj, uio, bytelen, advice, + UBC_READ | UBC_PARTIALOK | UBC_UNMAP_FLAG(vp)); if (error) { /* * XXXkludge @@ -532,7 +531,7 @@ error = ubc_uiomove(vp-v_uobj, uio, bytelen, UVM_ADV_RANDOM, UBC_WRITE | UBC_PARTIALOK | (overwrite ? UBC_FAULTBUSY : 0) | - (UBC_WANT_UNMAP(vp) ? UBC_UNMAP : 0)); + UBC_UNMAP_FLAG(vp)); if (error) { uvm_vnp_setwritesize(vp, vp-v_size); if (overwrite np-n_size != oldsize) { Index: src/sys/rump/librump/rumpvfs/rumpfs.c diff -u src/sys/rump/librump/rumpvfs/rumpfs.c:1.95 src/sys/rump/librump/rumpvfs/rumpfs.c:1.96 --- src/sys/rump/librump/rumpvfs/rumpfs.c:1.95 Sun Jun 12 03:35:59 2011 +++ src/sys/rump/librump/rumpvfs/rumpfs.c Sun Jun 19 02:42:53 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpfs.c,v 1.95 2011/06/12 03:35:59 rmind Exp $ */ +/* $NetBSD: rumpfs.c,v 1.96 2011/06/19 02:42:53 rmind Exp $ */ /* * Copyright (c) 2009, 2010, 2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rumpfs.c,v 1.95 2011/06/12 03:35:59 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: rumpfs.c,v 1.96 2011/06/19 02:42:53 rmind Exp $); #include sys/param.h #include sys/atomic.h @@ -1260,7 +1260,7 @@ if (chunk == 0) break; error = ubc_uiomove(vp-v_uobj, uio, chunk, advice, - UBC_READ | UBC_PARTIALOK | UBC_WANT_UNMAP(vp)?UBC_UNMAP:0); + UBC_READ | UBC_PARTIALOK | UBC_UNMAP_FLAG(vp)); if (error) break; } @@ -1353,7 +1353,7 @@ if (chunk == 0) break; error = ubc_uiomove(vp-v_uobj, uio, chunk, advice, - UBC_WRITE | UBC_PARTIALOK | UBC_WANT_UNMAP(vp)?UBC_UNMAP:0); + UBC_WRITE | UBC_PARTIALOK | UBC_UNMAP_FLAG(vp)); if (error) break; } Index: src/sys/ufs/ufs/ufs_readwrite.c diff
CVS commit: src/sys/dev/sysmon
Module Name:src Committed By: pgoyette Date: Sun Jun 19 03:09:44 UTC 2011 Modified Files: src/sys/dev/sysmon: sysmon_envsys_tables.c sysmon_envsysvar.h Log Message: Add routine to lookup description tables by description instead of by type. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/dev/sysmon/sysmon_envsys_tables.c cvs rdiff -u -r1.39 -r1.40 src/sys/dev/sysmon/sysmon_envsysvar.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_tables.c diff -u src/sys/dev/sysmon/sysmon_envsys_tables.c:1.6 src/sys/dev/sysmon/sysmon_envsys_tables.c:1.7 --- src/sys/dev/sysmon/sysmon_envsys_tables.c:1.6 Wed Dec 15 17:17:17 2010 +++ src/sys/dev/sysmon/sysmon_envsys_tables.c Sun Jun 19 03:09:43 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: sysmon_envsys_tables.c,v 1.6 2010/12/15 17:17:17 pgoyette Exp $ */ +/* $NetBSD: sysmon_envsys_tables.c,v 1.7 2011/06/19 03:09:43 pgoyette Exp $ */ /*- * Copyright (c) 2007 Juan Romero Pardines. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: sysmon_envsys_tables.c,v 1.6 2010/12/15 17:17:17 pgoyette Exp $); +__KERNEL_RCSID(0, $NetBSD: sysmon_envsys_tables.c,v 1.7 2011/06/19 03:09:43 pgoyette Exp $); #include sys/types.h @@ -129,3 +129,29 @@ return table; } +const struct sme_descr_entry * +sme_find_table_desc(enum sme_descr_type table_id, const char *str) +{ + const struct sme_descr_entry *table = NULL; + + switch (table_id) { + case SME_DESC_UNITS: + table = sme_units_description; + break; + case SME_DESC_STATES: + table = sme_state_description; + break; + case SME_DESC_DRIVE_STATES: + table = sme_drivestate_description; + break; + case SME_DESC_BATTERY_CAPACITY: + table = sme_batterycap_description; + break; + } + + for (; table-type != -1; table++) + if (strcmp(table-desc, str) == 0) + break; + return table; +} + Index: src/sys/dev/sysmon/sysmon_envsysvar.h diff -u src/sys/dev/sysmon/sysmon_envsysvar.h:1.39 src/sys/dev/sysmon/sysmon_envsysvar.h:1.40 --- src/sys/dev/sysmon/sysmon_envsysvar.h:1.39 Wed Jun 8 18:22:24 2011 +++ src/sys/dev/sysmon/sysmon_envsysvar.h Sun Jun 19 03:09:43 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: sysmon_envsysvar.h,v 1.39 2011/06/08 18:22:24 pgoyette Exp $ */ +/* $NetBSD: sysmon_envsysvar.h,v 1.40 2011/06/19 03:09:43 pgoyette Exp $ */ /*- * Copyright (c) 2007, 2008 Juan Romero Pardines. @@ -145,5 +145,7 @@ int sme_sensor_upstring(prop_dictionary_t, const char *, const char *); const struct sme_descr_entry *sme_find_table_entry(enum sme_descr_type, int); +const struct sme_descr_entry * sme_find_table_desc(enum sme_descr_type, + const char *); #endif /* _DEV_SYSMON_ENVSYSVAR_H_ */
CVS commit: src
Module Name:src Committed By: pgoyette Date: Sun Jun 19 03:12:31 UTC 2011 Modified Files: src/share/man/man4: swsensor.4 src/sys/dev/sysmon: swsensor.c Log Message: Rather than requiring the user to know the internal encoding of sensor types, allow the user to specify the type using the units description. XXX Numeric specification is still permitted but will be removed soon. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/share/man/man4/swsensor.4 cvs rdiff -u -r1.9 -r1.10 src/sys/dev/sysmon/swsensor.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/swsensor.4 diff -u src/share/man/man4/swsensor.4:1.8 src/share/man/man4/swsensor.4:1.9 --- src/share/man/man4/swsensor.4:1.8 Tue Jun 7 07:27:31 2011 +++ src/share/man/man4/swsensor.4 Sun Jun 19 03:12:31 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: swsensor.4,v 1.8 2011/06/07 07:27:31 wiz Exp $ +.\ $NetBSD: swsensor.4,v 1.9 2011/06/19 03:12:31 pgoyette Exp $ .\ .\ Copyright (c) 2010 The NetBSD Foundation .\ All rights reserved. @@ -27,7 +27,7 @@ .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\ POSSIBILITY OF SUCH DAMAGE. .\ -.Dd June 4, 2011 +.Dd June 19, 2011 .Dt SWSENSOR 4 .Os .Sh NAME @@ -49,13 +49,13 @@ By default, the sensor is of type .Dv ENVSYS_UNITS_INTEGER . .Pp -The following integer values can be specified in the +The following values can be specified in the .Xr modload 8 command when loading the .Nm module to alter the driver's behavior. .Pp -.Bl -tag -width variable +.Bl -tag -width percentage .It Sy Variable Sy Usage .It Li mode Controls whether or not @@ -72,7 +72,7 @@ comparison between the sensor's limit and its current value .El .It Li limit -The initial limit value, if limit emulation is selected (ie, if +The initial alarm limit value, if limit emulation is selected (ie, if .Dv mode is set to 1 or 2) .It Li value_max @@ -88,16 +88,26 @@ .Dv ENVSYS_FPERCENT flag. .It Li type -Override the sensor's unit/type. +Define the sensor's unit/type. +By default, a Temperature sensor is created. +Any of the string values from the following table can be specified: +.Bl -column Battery capacity Battery charge Ampere hour +.It Temperature Ta Fan Ta Voltage AC +.It Voltage DC Ta Ohms Ta Watts +.It Ampere Ta Watt hour Ta Ampere hour +.It IndicatorTa Integer Ta Drive +.It Battery capacity Ta Battery charge +.El +(Values are case-sensitive, and spaces must be included.) .It Li value Provide an initial value for the sensor. If this is omitted, the sensor's initial value is set to zero. .El .Pp For example, -.Dl Ic modload -i type=1 swsensor +.Dl Ic modload -s type=Voltage\e DC swsensor will create a sensor of type -.Dv ENVSYS_UNITS_SFANRPM , +.Dv ENVSYS_UNITS_SVOLTS_DC , while .Dl Ic modload -i mode=1 -i limit=50 swsensor will create a sensor which has an initial, device-provided limit of 50. Index: src/sys/dev/sysmon/swsensor.c diff -u src/sys/dev/sysmon/swsensor.c:1.9 src/sys/dev/sysmon/swsensor.c:1.10 --- src/sys/dev/sysmon/swsensor.c:1.9 Sat Jun 4 13:26:51 2011 +++ src/sys/dev/sysmon/swsensor.c Sun Jun 19 03:12:31 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: swsensor.c,v 1.9 2011/06/04 13:26:51 pgoyette Exp $ */ +/* $NetBSD: swsensor.c,v 1.10 2011/06/19 03:12:31 pgoyette Exp $ */ /* * Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: swsensor.c,v 1.9 2011/06/04 13:26:51 pgoyette Exp $); +__KERNEL_RCSID(0, $NetBSD: swsensor.c,v 1.10 2011/06/19 03:12:31 pgoyette Exp $); #include sys/param.h #include sys/kernel.h @@ -35,6 +35,7 @@ #include sys/sysctl.h #include dev/sysmon/sysmonvar.h +#include dev/sysmon/sysmon_envsysvar.h #include prop/proplib.h @@ -159,8 +160,12 @@ swsensor_init(void *arg) { int error; + const char *key, *str; prop_dictionary_t pd = (prop_dictionary_t)arg; - prop_object_t po = NULL; + prop_object_t po, obj; + prop_object_iterator_t iter; + prop_type_t type; + const struct sme_descr_entry *descr; swsensor_sme = sysmon_envsys_create(); if (swsensor_sme == NULL) @@ -172,116 +177,163 @@ swsensor_sme-sme_set_limits = NULL; swsensor_sme-sme_get_limits = NULL; - /* See if prop dictionary supplies a sensor type */ - if (pd != NULL) - po = prop_dictionary_get(pd, type); + /* Set defaults in case no prop dictionary given */ - if (po != NULL prop_object_type(po) == PROP_TYPE_NUMBER) - swsensor_edata.units = prop_number_integer_value(po); - else - swsensor_edata.units = ENVSYS_INTEGER; + swsensor_edata.units = ENVSYS_INTEGER; + swsensor_edata.flags = 0; + sw_sensor_mode = 0; + sw_sensor_value = 0; + sw_sensor_limit = 0; - /* See if prop dictionary supplies sensor flags */ - if (pd != NULL) - po = prop_dictionary_get(pd, flags); + /* Iterate over the provided
CVS commit: src/sys/dev/sysmon
Module Name:src Committed By: pgoyette Date: Sun Jun 19 04:08:48 UTC 2011 Modified Files: src/sys/dev/sysmon: swsensor.c Log Message: Use correct routine to retrieve string value from prop-dictionary To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/dev/sysmon/swsensor.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/sysmon/swsensor.c diff -u src/sys/dev/sysmon/swsensor.c:1.10 src/sys/dev/sysmon/swsensor.c:1.11 --- src/sys/dev/sysmon/swsensor.c:1.10 Sun Jun 19 03:12:31 2011 +++ src/sys/dev/sysmon/swsensor.c Sun Jun 19 04:08:48 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: swsensor.c,v 1.10 2011/06/19 03:12:31 pgoyette Exp $ */ +/* $NetBSD: swsensor.c,v 1.11 2011/06/19 04:08:48 pgoyette Exp $ */ /* * Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: swsensor.c,v 1.10 2011/06/19 03:12:31 pgoyette Exp $); +__KERNEL_RCSID(0, $NetBSD: swsensor.c,v 1.11 2011/06/19 04:08:48 pgoyette Exp $); #include sys/param.h #include sys/kernel.h @@ -205,7 +205,7 @@ } if (type != PROP_TYPE_STRING) return EINVAL; -str = prop_dictionary_keysym_cstring_nocopy(po); +str = prop_string_cstring_nocopy(po); descr = sme_find_table_desc(SME_DESC_UNITS, str); if (descr-type 0)
CVS commit: src/sys/dev/sysmon
Module Name:src Committed By: christos Date: Sun Jun 19 04:23:18 UTC 2011 Modified Files: src/sys/dev/sysmon: sysmon_envsys_tables.c Log Message: simplify and don't deref NULL. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/dev/sysmon/sysmon_envsys_tables.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/sysmon/sysmon_envsys_tables.c diff -u src/sys/dev/sysmon/sysmon_envsys_tables.c:1.7 src/sys/dev/sysmon/sysmon_envsys_tables.c:1.8 --- src/sys/dev/sysmon/sysmon_envsys_tables.c:1.7 Sat Jun 18 23:09:43 2011 +++ src/sys/dev/sysmon/sysmon_envsys_tables.c Sun Jun 19 00:23:18 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: sysmon_envsys_tables.c,v 1.7 2011/06/19 03:09:43 pgoyette Exp $ */ +/* $NetBSD: sysmon_envsys_tables.c,v 1.8 2011/06/19 04:23:18 christos Exp $ */ /*- * Copyright (c) 2007 Juan Romero Pardines. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: sysmon_envsys_tables.c,v 1.7 2011/06/19 03:09:43 pgoyette Exp $); +__KERNEL_RCSID(0, $NetBSD: sysmon_envsys_tables.c,v 1.8 2011/06/19 04:23:18 christos Exp $); #include sys/types.h @@ -100,58 +100,51 @@ { -1, -1, UNKNOWN } }; -/* - * Returns the entry from specified table with type == key - */ -const struct sme_descr_entry * -sme_find_table_entry(enum sme_descr_type table_id, int key) +static const struct sme_desc_entry * +sme_find_table(enum sme_descr_type table_id) { - const struct sme_descr_entry *table = NULL; - switch (table_id) { case SME_DESC_UNITS: - table = sme_units_description; + return sme_units_description; break; case SME_DESC_STATES: - table = sme_state_description; + return sme_state_description; break; case SME_DESC_DRIVE_STATES: - table = sme_drivestate_description; + return sme_drivestate_description; break; case SME_DESC_BATTERY_CAPACITY: - table = sme_batterycap_description; + return sme_batterycap_description; break; + default: + return NULL; } +} + +/* + * Returns the entry from specified table with type == key + */ +const struct sme_descr_entry * +sme_find_table_entry(enum sme_descr_type table_id, int key) +{ + const struct sme_descr_entry *table = sme_find_table(); - for (; table-type != -1; table++) - if (table-type == key) - break; + if (table != NULL) + for (; table-type != -1; table++) + if (table-type == key) +return table; - return table; + return NULL; } + const struct sme_descr_entry * sme_find_table_desc(enum sme_descr_type table_id, const char *str) { - const struct sme_descr_entry *table = NULL; + const struct sme_descr_entry *table = sme_find_table(); - switch (table_id) { - case SME_DESC_UNITS: - table = sme_units_description; - break; - case SME_DESC_STATES: - table = sme_state_description; - break; - case SME_DESC_DRIVE_STATES: - table = sme_drivestate_description; - break; - case SME_DESC_BATTERY_CAPACITY: - table = sme_batterycap_description; - break; - } - - for (; table-type != -1; table++) - if (strcmp(table-desc, str) == 0) - break; - return table; + if (table != NULL) + for (; table-type != -1; table++) + if (strcmp(table-desc, str) == 0) +return table; + return NULL; } -
CVS commit: src/sys/dev/sysmon
Module Name:src Committed By: nonaka Date: Sun Jun 19 05:17:38 UTC 2011 Modified Files: src/sys/dev/sysmon: sysmon_envsys_tables.c Log Message: fix typo. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/dev/sysmon/sysmon_envsys_tables.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/sysmon/sysmon_envsys_tables.c diff -u src/sys/dev/sysmon/sysmon_envsys_tables.c:1.8 src/sys/dev/sysmon/sysmon_envsys_tables.c:1.9 --- src/sys/dev/sysmon/sysmon_envsys_tables.c:1.8 Sun Jun 19 04:23:18 2011 +++ src/sys/dev/sysmon/sysmon_envsys_tables.c Sun Jun 19 05:17:38 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: sysmon_envsys_tables.c,v 1.8 2011/06/19 04:23:18 christos Exp $ */ +/* $NetBSD: sysmon_envsys_tables.c,v 1.9 2011/06/19 05:17:38 nonaka Exp $ */ /*- * Copyright (c) 2007 Juan Romero Pardines. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: sysmon_envsys_tables.c,v 1.8 2011/06/19 04:23:18 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: sysmon_envsys_tables.c,v 1.9 2011/06/19 05:17:38 nonaka Exp $); #include sys/types.h @@ -100,7 +100,7 @@ { -1, -1, UNKNOWN } }; -static const struct sme_desc_entry * +static const struct sme_descr_entry * sme_find_table(enum sme_descr_type table_id) { switch (table_id) {
CVS commit: src/sys/dev/sysmon
Module Name:src Committed By: nonaka Date: Sun Jun 19 05:26:32 UTC 2011 Modified Files: src/sys/dev/sysmon: sysmon_envsys_tables.c Log Message: Pass table_id to sme_find_table(). To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/dev/sysmon/sysmon_envsys_tables.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/sysmon/sysmon_envsys_tables.c diff -u src/sys/dev/sysmon/sysmon_envsys_tables.c:1.9 src/sys/dev/sysmon/sysmon_envsys_tables.c:1.10 --- src/sys/dev/sysmon/sysmon_envsys_tables.c:1.9 Sun Jun 19 05:17:38 2011 +++ src/sys/dev/sysmon/sysmon_envsys_tables.c Sun Jun 19 05:26:31 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: sysmon_envsys_tables.c,v 1.9 2011/06/19 05:17:38 nonaka Exp $ */ +/* $NetBSD: sysmon_envsys_tables.c,v 1.10 2011/06/19 05:26:31 nonaka Exp $ */ /*- * Copyright (c) 2007 Juan Romero Pardines. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: sysmon_envsys_tables.c,v 1.9 2011/06/19 05:17:38 nonaka Exp $); +__KERNEL_RCSID(0, $NetBSD: sysmon_envsys_tables.c,v 1.10 2011/06/19 05:26:31 nonaka Exp $); #include sys/types.h @@ -127,7 +127,7 @@ const struct sme_descr_entry * sme_find_table_entry(enum sme_descr_type table_id, int key) { - const struct sme_descr_entry *table = sme_find_table(); + const struct sme_descr_entry *table = sme_find_table(table_id); if (table != NULL) for (; table-type != -1; table++) @@ -140,7 +140,7 @@ const struct sme_descr_entry * sme_find_table_desc(enum sme_descr_type table_id, const char *str) { - const struct sme_descr_entry *table = sme_find_table(); + const struct sme_descr_entry *table = sme_find_table(table_id); if (table != NULL) for (; table-type != -1; table++)