CVS commit: src/etc/mtree
Module Name:src Committed By: apb Date: Wed Apr 8 06:55:09 UTC 2009 Modified Files: src/etc/mtree: NetBSD.dist Log Message: Add usr/tests/util/mtree To generate a diff of this commit: cvs rdiff -u -r1.393 -r1.394 src/etc/mtree/NetBSD.dist Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/mtree/NetBSD.dist diff -u src/etc/mtree/NetBSD.dist:1.393 src/etc/mtree/NetBSD.dist:1.394 --- src/etc/mtree/NetBSD.dist:1.393 Tue Mar 3 06:01:56 2009 +++ src/etc/mtree/NetBSD.dist Wed Apr 8 06:55:09 2009 @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist,v 1.393 2009/03/03 06:01:56 mrg Exp $ +# $NetBSD: NetBSD.dist,v 1.394 2009/04/08 06:55:09 apb Exp $ # @(#)4.4BSD.dist 8.1 (Berkeley) 6/13/93 # Do not customize this file as it may be overwritten on upgrades. @@ -1440,6 +1440,7 @@ ./usr/tests/util/id ./usr/tests/util/m4 ./usr/tests/util/make +./usr/tests/util/mtree ./usr/tests/util/ps ./usr/tests/util/sdiff ./usr/tests/util/sh
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: dyoung Date: Wed Apr 8 00:23:30 UTC 2009 Modified Files: src/sys/dev/acpi: acpi.c acpivar.h Log Message: Refactor slightly to create acpi_rescan(), a hook for rescanning the devices that attach at acpi(4). Begin deriving an acpi(4) device-detachment hook, acpi_detach(), from acpi_attach(). The code between #if 0 and #endif still needs to be turned to the opposite calls (enables to disables, maps to unmaps, attaches to detaches), which should be run in the opposite order. Somebody with deep ACPI knowledge can probably finish this off without too much trouble. To generate a diff of this commit: cvs rdiff -u -r1.123 -r1.124 src/sys/dev/acpi/acpi.c cvs rdiff -u -r1.34 -r1.35 src/sys/dev/acpi/acpivar.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/acpi/acpi.c diff -u src/sys/dev/acpi/acpi.c:1.123 src/sys/dev/acpi/acpi.c:1.124 --- src/sys/dev/acpi/acpi.c:1.123 Fri Jan 30 12:51:03 2009 +++ src/sys/dev/acpi/acpi.c Wed Apr 8 00:23:30 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi.c,v 1.123 2009/01/30 12:51:03 jmcneill Exp $ */ +/* $NetBSD: acpi.c,v 1.124 2009/04/08 00:23:30 dyoung Exp $ */ /*- * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.123 2009/01/30 12:51:03 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.124 2009/04/08 00:23:30 dyoung Exp $"); #include "opt_acpi.h" #include "opt_pcifixup.h" @@ -120,6 +120,11 @@ static int acpi_match(device_t, struct cfdata *, void *); static void acpi_attach(device_t, device_t, void *); static void acpi_childdet(device_t, device_t); +static int acpi_detach(device_t, int); + +static int acpi_rescan(device_t, const char *, const int *); +static void acpi_rescan1(struct acpi_softc *, const char *, const int *); +static void acpi_rescan_nodes(struct acpi_softc *); static int acpi_print(void *aux, const char *); @@ -128,7 +133,7 @@ extern struct cfdriver acpi_cd; CFATTACH_DECL2_NEW(acpi, sizeof(struct acpi_softc), -acpi_match, acpi_attach, NULL, NULL, NULL, acpi_childdet); +acpi_match, acpi_attach, acpi_detach, NULL, acpi_rescan, acpi_childdet); /* * This is a flag we set when the ACPI subsystem is active. Machine @@ -386,6 +391,9 @@ struct acpi_scope *as; struct acpi_devnode *ad; + if (sc->sc_apmbus == child) + sc->sc_apmbus = NULL; + TAILQ_FOREACH(as, &sc->sc_scopes, as_list) { TAILQ_FOREACH(ad, &as->as_devnodes, ad_list) { if (ad->ad_device == child) @@ -525,6 +533,81 @@ #endif } +static int +acpi_detach(device_t self, int flags) +{ + int rc; + +#ifdef ACPI_DEBUGGER + if (acpi_dbgr & ACPI_DBGR_RUNNING) + acpi_osd_debugger(); +#endif + + if ((rc = config_detach_children(self, flags)) != 0) + return rc; + +#ifdef ACPI_DEBUGGER + if (acpi_dbgr & ACPI_DBGR_PROBE) + acpi_osd_debugger(); +#endif + + if ((rc = acpitimer_detach()) != 0) + return rc; + +#if 0 + /* + * Bring ACPI on-line. + */ +#ifdef ACPI_DEBUGGER + if (acpi_dbgr & ACPI_DBGR_ENABLE) + acpi_osd_debugger(); +#endif + +#define ACPI_ENABLE_PHASE1 \ +(ACPI_NO_HANDLER_INIT | ACPI_NO_EVENT_INIT) +#define ACPI_ENABLE_PHASE2 \ +(ACPI_NO_HARDWARE_INIT | ACPI_NO_ACPI_ENABLE | \ + ACPI_NO_ADDRESS_SPACE_INIT) + + rv = AcpiEnableSubsystem(ACPI_ENABLE_PHASE1); + if (ACPI_FAILURE(rv)) { + aprint_error_dev(self, "unable to enable ACPI: %s\n", + AcpiFormatException(rv)); + return; + } + + rv = AcpiEnableSubsystem(ACPI_ENABLE_PHASE2); + if (ACPI_FAILURE(rv)) { + aprint_error_dev(self, "unable to enable ACPI: %s\n", + AcpiFormatException(rv)); + return; + } + + /* early EC handler initialization if ECDT table is available */ + config_found_ia(self, "acpiecdtbus", NULL, NULL); + + rv = AcpiInitializeObjects(ACPI_FULL_INITIALIZATION); + if (ACPI_FAILURE(rv)) { + aprint_error_dev(self, + "unable to initialize ACPI objects: %s\n", + AcpiFormatException(rv)); + return; + } + acpi_active = 1; + + acpi_enable_fixed_events(sc); +#endif + + pmf_device_deregister(self); + +#if 0 + sysmon_power_settype("acpi"); +#endif + acpi_softc = NULL; + + return 0; +} + static bool acpi_suspend(device_t dv PMF_FN_ARGS) { @@ -580,10 +663,8 @@ "\\_TZ_", /* ACPI 1.0 thermal zone namespace */ NULL, }; - struct acpi_attach_args aa; struct acpi_make_devnode_state state; struct acpi_scope *as; - struct acpi_devnode *ad; ACPI_HANDLE parent; ACPI_STATUS rv; int i; @@ -610,9 +691,54 @@ AcpiWalkNamespace(ACPI_TYPE_ANY, parent, 100, acpi_make_devnode, &state, NULL); } + } + + acpi_rescan1(sc, NULL, NULL); +} - /* Now, for this namespace, try and attach the devices. */ +static int +acpi_rescan(device_t self, const char *ifattr, const int *locators) +{ + struct acpi_softc *sc = device_private(self); + + acpi_rescan1(sc, ifattr, locators); + return 0; +} + +/* XXX share this with sys/arch/i386/
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: dyoung Date: Wed Apr 8 00:15:45 UTC 2009 Modified Files: src/sys/dev/acpi: acpi_timer.c acpi_timer.h Log Message: Add acpitimer_detach() to eventually support acpi(4) detachment. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/dev/acpi/acpi_timer.c cvs rdiff -u -r1.1 -r1.2 src/sys/dev/acpi/acpi_timer.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/acpi/acpi_timer.c diff -u src/sys/dev/acpi/acpi_timer.c:1.13 src/sys/dev/acpi/acpi_timer.c:1.14 --- src/sys/dev/acpi/acpi_timer.c:1.13 Sun Mar 15 15:42:55 2009 +++ src/sys/dev/acpi/acpi_timer.c Wed Apr 8 00:15:45 2009 @@ -1,7 +1,7 @@ -/* $NetBSD: acpi_timer.c,v 1.13 2009/03/15 15:42:55 cegger Exp $ */ +/* $NetBSD: acpi_timer.c,v 1.14 2009/04/08 00:15:45 dyoung Exp $ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi_timer.c,v 1.13 2009/03/15 15:42:55 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_timer.c,v 1.14 2009/04/08 00:15:45 dyoung Exp $"); #include #include @@ -57,6 +57,12 @@ return (0); } +int +acpitimer_detach(void) +{ + return tc_detach(&acpi_timecounter); +} + static u_int acpitimer_read_fast(struct timecounter *tc) { Index: src/sys/dev/acpi/acpi_timer.h diff -u src/sys/dev/acpi/acpi_timer.h:1.1 src/sys/dev/acpi/acpi_timer.h:1.2 --- src/sys/dev/acpi/acpi_timer.h:1.1 Wed Jun 21 17:47:23 2006 +++ src/sys/dev/acpi/acpi_timer.h Wed Apr 8 00:15:45 2009 @@ -1,3 +1,4 @@ -/* $NetBSD: acpi_timer.h,v 1.1 2006/06/21 17:47:23 drochner Exp $ */ +/* $NetBSD: acpi_timer.h,v 1.2 2009/04/08 00:15:45 dyoung Exp $ */ int acpitimer_init(void); +int acpitimer_detach(void);
CVS commit: src/sys/dev/isa
Module Name:src Committed By: dyoung Date: Wed Apr 8 00:12:27 UTC 2009 Modified Files: src/sys/dev/isa: midi_pcppi.c Log Message: Decrease midi_pcppi_attached when midi at pcppi detaches. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/dev/isa/midi_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/midi_pcppi.c diff -u src/sys/dev/isa/midi_pcppi.c:1.21 src/sys/dev/isa/midi_pcppi.c:1.22 --- src/sys/dev/isa/midi_pcppi.c:1.21 Tue Apr 7 18:31:12 2009 +++ src/sys/dev/isa/midi_pcppi.c Wed Apr 8 00:12:27 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: midi_pcppi.c,v 1.21 2009/04/07 18:31:12 dyoung Exp $ */ +/* $NetBSD: midi_pcppi.c,v 1.22 2009/04/08 00:12:27 dyoung Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: midi_pcppi.c,v 1.21 2009/04/07 18:31:12 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: midi_pcppi.c,v 1.22 2009/04/08 00:12:27 dyoung Exp $"); #include #include @@ -94,6 +94,10 @@ struct pcppi_attach_args *pa = (struct pcppi_attach_args *)aux; midisyn *ms; + KASSERT(midi_pcppi_attached > 0); + + midi_pcppi_attached--; + sc->sc_mididev.dev = self; ms = &sc->sc_midisyn; ms->mets = &midi_pcppi_hw;
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: snj Date: Wed Apr 8 00:12:21 UTC 2009 Modified Files: src/doc [netbsd-5]: CHANGES-5.0 Log Message: Tickets 669, 671-674, 676, and 677. To generate a diff of this commit: cvs rdiff -u -r1.1.2.128 -r1.1.2.129 src/doc/CHANGES-5.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.0 diff -u src/doc/CHANGES-5.0:1.1.2.128 src/doc/CHANGES-5.0:1.1.2.129 --- src/doc/CHANGES-5.0:1.1.2.128 Tue Apr 7 20:49:29 2009 +++ src/doc/CHANGES-5.0 Wed Apr 8 00:12:21 2009 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.0,v 1.1.2.128 2009/04/07 20:49:29 snj Exp $ +# $NetBSD: CHANGES-5.0,v 1.1.2.129 2009/04/08 00:12:21 snj Exp $ A complete list of changes from the initial NetBSD 5.0 branch on October 2008 until the 5.0 release: @@ -5874,3 +5874,52 @@ Fixes PR 41134. [jld, ticket #668] +sys/sys/timex.h 1.18 + + PR#41144: ntpd dies when syncing, use octal format to avoid + \xcCLOCK to be parsed as \xcc + [mhitch, ticket #671] + +sys/arch/x86/pci/ichlpcib.c 1.16 + + Restore SpeedStep settings on shutdown. Some BIOSes don't like + it if SpeedStep is enabled and powerdown fails otherwise. + Fixes PR kern/40487. + [joerg, ticket #669] + +usr.sbin/postinstall/postinstall 1.93 via patch + + Now that we use ?= to optionally set ddb.onpanic and +kern.no_sa_support, match that when testing existing +configurations too. + [martin, ticket #672] + +xsrc/external/mit/libdrm/dist/shared-core/drm.h 1.3 + + Fix type of DRM_IOCTL_SG_ALLOC ioctl -- it should be input/output + instead of just input. + [rafal, ticket #673] + +sys/kern/uipc_mbuf.c1.132 + + m_split0(): If the newly allocated mbuf holds only the + header, don't forget to set m_len to 0. Otherwise whatever will + compute the size of this chain (including s_split() itself if + called again on this chain) will get it wrong, leading to + various issues. Bug exposed by the NFS server code with linux + clients using TCP mounts. + [bouyer, ticket #674] + +dist/bzip2/bzip2.c1.7 + + Fix null references introduced while merging bzip2 1.0.5 + Fixes PR/41032 + [kefren, ticket #676] + +distrib/sets/sets.subr1.83 + + Print debug messages only when MAKEVERBOSE >= 3, not when + it is >= 2. MAKEVERBOSE=2 is the default, and the messages + are too noisy. + [apb, ticket #677] +
CVS commit: [netbsd-5] src/distrib/sets
Module Name:src Committed By: snj Date: Wed Apr 8 00:09:27 UTC 2009 Modified Files: src/distrib/sets [netbsd-5]: sets.subr Log Message: Pull up following revision(s) (requested by apb in ticket #677): distrib/sets/sets.subr: revision 1.83 Print debug messages only when MAKEVERBOSE >= 3, not when it is >= 2. MAKEVERBOSE=2 is the default, and the messages are too noisy. To generate a diff of this commit: cvs rdiff -u -r1.71.2.4 -r1.71.2.5 src/distrib/sets/sets.subr Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/sets.subr diff -u src/distrib/sets/sets.subr:1.71.2.4 src/distrib/sets/sets.subr:1.71.2.5 --- src/distrib/sets/sets.subr:1.71.2.4 Sat Apr 4 17:56:13 2009 +++ src/distrib/sets/sets.subr Wed Apr 8 00:09:27 2009 @@ -1,4 +1,4 @@ -# $NetBSD: sets.subr,v 1.71.2.4 2009/04/04 17:56:13 snj Exp $ +# $NetBSD: sets.subr,v 1.71.2.5 2009/04/08 00:09:27 snj Exp $ # # @@ -228,7 +228,7 @@ # In each file, a record consists of a path and a System Package name, # separated by whitespace. E.g., # -# # $NetBSD: sets.subr,v 1.71.2.4 2009/04/04 17:56:13 snj Exp $ +# # $NetBSD: sets.subr,v 1.71.2.5 2009/04/08 00:09:27 snj Exp $ # . base-sys-root [keyword[,...]] # ./altroot base-sys-root # ./bin base-sys-root @@ -305,7 +305,7 @@ # list_set_files() { - if [ ${MAKEVERBOSE:-2} -lt 2 ]; then + if [ ${MAKEVERBOSE:-2} -lt 3 ]; then verbose=false else verbose=true
CVS commit: [netbsd-5] src/dist/bzip2
Module Name:src Committed By: snj Date: Wed Apr 8 00:06:09 UTC 2009 Modified Files: src/dist/bzip2 [netbsd-5]: bzip2.c Log Message: Pull up following revision(s) (requested by kefren in ticket #676): dist/bzip2/bzip2.c: revision 1.7 fix null references introduced while merging bzip2 1.0.5 fixes PR/41032 ok christos@ To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.6.8.1 src/dist/bzip2/bzip2.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/dist/bzip2/bzip2.c diff -u src/dist/bzip2/bzip2.c:1.6 src/dist/bzip2/bzip2.c:1.6.8.1 --- src/dist/bzip2/bzip2.c:1.6 Tue Mar 18 17:35:36 2008 +++ src/dist/bzip2/bzip2.c Wed Apr 8 00:06:09 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: bzip2.c,v 1.6 2008/03/18 17:35:36 christos Exp $ */ +/* $NetBSD: bzip2.c,v 1.6.8.1 2009/04/08 00:06:09 snj Exp $ */ /*---*/ @@ -470,7 +470,7 @@ } if (bzerr != BZ_STREAM_END) goto errhandler; - BZ2_bzReadGetUnused ( &bzerr, bzf, (void*)(&unusedTmp), &nUnused ); + BZ2_bzReadGetUnused ( &bzerr, bzf, (void*)(&unusedTmpV), &nUnused ); if (bzerr != BZ_OK) panic ( "decompress:bzReadGetUnused" ); unusedTmp = (UChar*)unusedTmpV; @@ -585,7 +585,7 @@ } if (bzerr != BZ_STREAM_END) goto errhandler; - BZ2_bzReadGetUnused ( &bzerr, bzf, (void*)(&unusedTmp), &nUnused ); + BZ2_bzReadGetUnused ( &bzerr, bzf, (void*)(&unusedTmpV), &nUnused ); if (bzerr != BZ_OK) panic ( "test:bzReadGetUnused" ); unusedTmp = (UChar*)unusedTmpV;
CVS commit: [netbsd-5] src/sys/kern
Module Name:src Committed By: snj Date: Tue Apr 7 23:43:16 UTC 2009 Modified Files: src/sys/kern [netbsd-5]: uipc_mbuf.c Log Message: Pull up following revision(s) (requested by bouyer in ticket #674): sys/kern/uipc_mbuf.c: revision 1.132 m_split0(): If the newly allocated mbuf holds only the header, don't forget to set m_len to 0. Otherwise whatever will compute the size of this chain (including s_split() itself if called again on this chain) will get it wrong, leading to various issues. Bug exposed by the NFS server code with linux clients using TCP mounts. To generate a diff of this commit: cvs rdiff -u -r1.128 -r1.128.6.1 src/sys/kern/uipc_mbuf.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_mbuf.c diff -u src/sys/kern/uipc_mbuf.c:1.128 src/sys/kern/uipc_mbuf.c:1.128.6.1 --- src/sys/kern/uipc_mbuf.c:1.128 Wed Jul 2 14:47:34 2008 +++ src/sys/kern/uipc_mbuf.c Tue Apr 7 23:43:16 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: uipc_mbuf.c,v 1.128 2008/07/02 14:47:34 matt Exp $ */ +/* $NetBSD: uipc_mbuf.c,v 1.128.6.1 2009/04/07 23:43:16 snj Exp $ */ /*- * Copyright (c) 1999, 2001 The NetBSD Foundation, Inc. @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.128 2008/07/02 14:47:34 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.128.6.1 2009/04/07 23:43:16 snj Exp $"); #include "opt_mbuftrace.h" #include "opt_ddb.h" @@ -1048,6 +1048,7 @@ if (remain > MHLEN) { /* m can't be the lead packet */ MH_ALIGN(n, 0); + n->m_len = 0; n->m_next = m_split(m, len, wait); if (n->m_next == 0) { (void) m_free(n);
CVS commit: [netbsd-5] xsrc/external/mit/libdrm/dist/shared-core
Module Name:xsrc Committed By: snj Date: Tue Apr 7 23:39:33 UTC 2009 Modified Files: xsrc/external/mit/libdrm/dist/shared-core [netbsd-5]: drm.h Log Message: Pull up following revision(s) (requested by rafal in ticket #673): external/mit/libdrm/dist/shared-core/drm.h: revision 1.3 Fix type of DRM_IOCTL_SG_ALLOC ioctl -- it should be input/output instead of just input. Noticed while debugging some scatter/gather fixes from FreeBSD. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.2.2.1 xsrc/external/mit/libdrm/dist/shared-core/drm.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/libdrm/dist/shared-core/drm.h diff -u xsrc/external/mit/libdrm/dist/shared-core/drm.h:1.2 xsrc/external/mit/libdrm/dist/shared-core/drm.h:1.2.2.1 --- xsrc/external/mit/libdrm/dist/shared-core/drm.h:1.2 Thu Jul 31 01:30:22 2008 +++ xsrc/external/mit/libdrm/dist/shared-core/drm.h Tue Apr 7 23:39:33 2009 @@ -909,7 +909,7 @@ #define DRM_IOCTL_AGP_BIND DRM_IOW( 0x36, drm_agp_binding_t) #define DRM_IOCTL_AGP_UNBIND DRM_IOW( 0x37, drm_agp_binding_t) -#define DRM_IOCTL_SG_ALLOC DRM_IOW( 0x38, drm_scatter_gather_t) +#define DRM_IOCTL_SG_ALLOC DRM_IOWR(0x38, drm_scatter_gather_t) #define DRM_IOCTL_SG_FREE DRM_IOW( 0x39, drm_scatter_gather_t) #define DRM_IOCTL_WAIT_VBLANK DRM_IOWR(0x3a, drm_wait_vblank_t)
CVS commit: [netbsd-5] src/usr.sbin/postinstall
Module Name:src Committed By: snj Date: Tue Apr 7 23:36:38 UTC 2009 Modified Files: src/usr.sbin/postinstall [netbsd-5]: postinstall Log Message: Pull up following revision(s) (requested by martin in ticket #672): usr.sbin/postinstall/postinstall: revision 1.93 via patch Now that we use ?= to optionally assing to ddb.onpanic, match that when testint existing configurations too. For 5.0, do the same with kern.no_sa_support. To generate a diff of this commit: cvs rdiff -u -r1.76.2.15 -r1.76.2.16 src/usr.sbin/postinstall/postinstall Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/postinstall/postinstall diff -u src/usr.sbin/postinstall/postinstall:1.76.2.15 src/usr.sbin/postinstall/postinstall:1.76.2.16 --- src/usr.sbin/postinstall/postinstall:1.76.2.15 Fri Apr 3 17:52:48 2009 +++ src/usr.sbin/postinstall/postinstall Tue Apr 7 23:36:38 2009 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: postinstall,v 1.76.2.15 2009/04/03 17:52:48 snj Exp $ +# $NetBSD: postinstall,v 1.76.2.16 2009/04/07 23:36:38 snj Exp $ # # Copyright (c) 2002-2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -667,7 +667,7 @@ { [ -n "$1" ] || err 3 "USAGE: do_ddbonpanic fix|check" - if ${GREP} -E '^#*[[:space:]]*ddb\.onpanic[[:space:]]*=[[:space:]]*[[:digit:]]+' \ + if ${GREP} -E '^#*[[:space:]]*ddb\.onpanic[[:space:]]*\??=[[:space:]]*[[:digit:]]+' \ "${DEST_DIR}/etc/sysctl.conf" >/dev/null 2>&1 then result=0 @@ -889,7 +889,7 @@ { [ -n "$1" ] || err 3 "USAGE: do_nosa fix|check" - if ${GREP} -E '^#*[[:space:]]*kern\.no_sa_support[[:space:]]*=[[:space:]]*[[:digit:]]+' \ + if ${GREP} -E '^#*[[:space:]]*kern\.no_sa_support[[:space:]]*\??=[[:space:]]*[[:digit:]]+' \ "${DEST_DIR}/etc/sysctl.conf" >/dev/null 2>&1 then result=0
CVS commit: [netbsd-5] src/sys/arch/x86/pci
Module Name:src Committed By: snj Date: Tue Apr 7 23:28:30 UTC 2009 Modified Files: src/sys/arch/x86/pci [netbsd-5]: ichlpcib.c Log Message: Pull up following revision(s) (requested by joerg in ticket #669): sys/arch/x86/pci/ichlpcib.c: revision 1.16 Restore SpeedStep settings on shutdown. Some BIOSes don't like it, if SpeedStep is enabled and powerdown fails otherwise. Fixes PR kern/40487. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.14.4.1 src/sys/arch/x86/pci/ichlpcib.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/pci/ichlpcib.c diff -u src/sys/arch/x86/pci/ichlpcib.c:1.14 src/sys/arch/x86/pci/ichlpcib.c:1.14.4.1 --- src/sys/arch/x86/pci/ichlpcib.c:1.14 Mon Oct 13 15:10:51 2008 +++ src/sys/arch/x86/pci/ichlpcib.c Tue Apr 7 23:28:30 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ichlpcib.c,v 1.14 2008/10/13 15:10:51 joerg Exp $ */ +/* $NetBSD: ichlpcib.c,v 1.14.4.1 2009/04/07 23:28:30 snj Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ichlpcib.c,v 1.14 2008/10/13 15:10:51 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ichlpcib.c,v 1.14.4.1 2009/04/07 23:28:30 snj Exp $"); #include #include @@ -86,6 +86,9 @@ uint32_t sc_hpet_reg; #endif + /* Speedstep */ + pcireg_t sc_pmcon_orig; + /* Power management */ pcireg_t sc_pirq[2]; pcireg_t sc_pmcon; @@ -96,6 +99,7 @@ static void lpcibattach(device_t, device_t, void *); static bool lpcib_suspend(device_t PMF_FN_PROTO); static bool lpcib_resume(device_t PMF_FN_PROTO); +static bool lpcib_shutdown(device_t, int); static void pmtimer_configure(device_t); @@ -205,6 +209,9 @@ return; } + sc->sc_pmcon_orig = pci_conf_read(sc->sc_pcib.sc_pc, sc->sc_pcib.sc_tag, + LPCIB_PCI_GEN_PMCON_1); + /* For ICH6 and later, always enable RCBA */ if (sc->sc_has_rcba) { pcireg_t rcba; @@ -241,11 +248,23 @@ #endif /* Install power handler */ - if (!pmf_device_register(self, lpcib_suspend, lpcib_resume)) + if (!pmf_device_register1(self, lpcib_suspend, lpcib_resume, + lpcib_shutdown)) aprint_error_dev(self, "couldn't establish power handler\n"); } static bool +lpcib_shutdown(device_t dv, int howto) +{ + struct lpcib_softc *sc = device_private(dv); + + pci_conf_write(sc->sc_pcib.sc_pc, sc->sc_pcib.sc_tag, + LPCIB_PCI_GEN_PMCON_1, sc->sc_pmcon_orig); + + return true; +} + +static bool lpcib_suspend(device_t dv PMF_FN_ARGS) { struct lpcib_softc *sc = device_private(dv);
CVS commit: [netbsd-5] src/sys/sys
Module Name:src Committed By: snj Date: Tue Apr 7 23:25:09 UTC 2009 Modified Files: src/sys/sys [netbsd-5]: timex.h Log Message: Pull up following revision(s) (requested by mhitch in ticket #671): sys/sys/timex.h: revision 1.18 PR#41144: ntpd dies when syncing, use octal format to avoid \xcCLOCK to be parsed as \xcc To generate a diff of this commit: cvs rdiff -u -r1.14.12.2 -r1.14.12.3 src/sys/sys/timex.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/sys/timex.h diff -u src/sys/sys/timex.h:1.14.12.2 src/sys/sys/timex.h:1.14.12.3 --- src/sys/sys/timex.h:1.14.12.2 Fri Jan 16 03:04:45 2009 +++ src/sys/sys/timex.h Tue Apr 7 23:25:09 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: timex.h,v 1.14.12.2 2009/01/16 03:04:45 snj Exp $ */ +/* $NetBSD: timex.h,v 1.14.12.3 2009/04/07 23:25:09 snj Exp $ */ /*- *** @@ -167,14 +167,14 @@ b\5DEL\0\ b\6UNSYNC\0\ b\7FREQHOLD\0\ -b\x8PPSSIGNAL\0\ -b\x9PPSJITTER\0\ -b\xaPPSWANDER\0\ -b\xbPPSERROR\0\ -b\xcCLOCKERR\0\ -b\xdNANO\0\ -f\xe\1MODE\0=\0PLL\0=\1FLL\0\ -f\xf\1CLK\0=\0A\0=\1B\0" +b\10PPSSIGNAL\0\ +b\11PPSJITTER\0\ +b\12PPSWANDER\0\ +b\13PPSERROR\0\ +b\14CLOCKERR\0\ +b\15NANO\0\ +f\16\1MODE\0=\0PLL\0=\1FLL\0\ +f\17\1CLK\0=\0A\0=\1B\0" #define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | \ STA_PPSERROR | STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK)
CVS commit: xsrc/external/mit/xf86-video-crime/dist/src
Module Name:xsrc Committed By: macallan Date: Tue Apr 7 23:11:44 UTC 2009 Modified Files: xsrc/external/mit/xf86-video-crime/dist/src: crime_accel.c Log Message: use MTE for simple copy and rectangle operations whenever possible The speedup is measurable but somewhat erratic because of the MTE's funny alignment requirements when doing copy operations. Filling rectangles is much faster this way. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 \ xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c diff -u xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.7 xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.8 --- xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.7 Wed Apr 1 14:58:03 2009 +++ xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c Tue Apr 7 23:11:44 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: crime_accel.c,v 1.7 2009/04/01 14:58:03 macallan Exp $ */ +/* $NetBSD: crime_accel.c,v 1.8 2009/04/07 23:11:44 macallan Exp $ */ /* * Copyright (c) 2008 Michael Lorenz * All rights reserved. @@ -94,7 +94,6 @@ LOG(CRIME_DEBUG_BITBLT); MAKE_ROOM(9); -#if 0 if ((rop == GXcopy) && (planemask == 0x) && (xdir > 0)) { /* use the MTE */ WRITE4(CRIME_MTE_MODE, MTE_MODE_DST_ECC | @@ -111,7 +110,6 @@ WRITE4(CRIME_MTE_SRC_Y_STEP, -1); } } else -#endif fPtr->use_mte = 0; WRITE4(CRIME_DE_XFER_STEP_X, 1); @@ -144,7 +142,6 @@ { CrimePtr fPtr = CRIMEPTR(pScrn); uint32_t prim = DE_PRIM_RECTANGLE; - volatile uint32_t reg, oreg; uint32_t rxa, rya, rxe, rye, rxs, rys, rxd, ryd, rxde, ryde; LOG(CRIME_DEBUG_BITBLT); @@ -152,8 +149,8 @@ xf86Msg(X_ERROR, "%s: %d, %d; %d x %d -> %d %d\n", __func__, xSrc, ySrc, w, h, xDst, yDst); #endif - - if ((fPtr->use_mte) && (w > 64) && ((w & 3) == 0) && ((xSrc & 3) == 0) && ((xDst & 3) == 0)) { + if ((fPtr->use_mte) && (w > 64) && /*((w & 3) == 0) &&*/ + ((xSrc & 15) == (xDst & 15))) { if (fPtr->ydir == -1) { /* bottom to top */ rye = ySrc; @@ -171,13 +168,12 @@ rxe = ((xSrc + w) << 2) - 1; rxd = xDst << 2; rxde = ((xDst + w) << 2) - 1; - oreg = *CRIMEREG(0x4000); MAKE_ROOM(4); WRITE4(CRIME_MTE_SRC0, (rxa << 16) | rya); WRITE4(CRIME_MTE_SRC1, (rxe << 16) | rye); WRITE4(CRIME_MTE_DST0, (rxd << 16) | ryd); WRITE4ST(CRIME_MTE_DST1, (rxde << 16) | ryde); - reg = *CRIMEREG(0x4000); + //xf86Msg(X_ERROR, "MTE"); #ifdef CRIME_DEBUG_LOUD xf86Msg(X_ERROR, "reg: %08x %08x\n", oreg, reg); @@ -228,18 +224,32 @@ int i; LOG(CRIME_DEBUG_RECTFILL); - MAKE_ROOM(7); - WRITE4(CRIME_DE_PLANEMASK, planemask); - WRITE4(CRIME_DE_ROP, rop); - WRITE4(CRIME_DE_FG, colour << 8); - WRITE4(CRIME_DE_DRAWMODE, - DE_DRAWMODE_PLANEMASK | DE_DRAWMODE_BYTEMASK | DE_DRAWMODE_ROP | - DE_DRAWMODE_SCISSOR_EN); - WRITE4(CRIME_DE_PRIMITIVE, - DE_PRIM_RECTANGLE | DE_PRIM_LR | DE_PRIM_TB); - WRITE4(CRIME_DE_MODE_DST, DE_MODE_TLB_A | DE_MODE_BUFDEPTH_32 | - DE_MODE_TYPE_RGBA | DE_MODE_PIXDEPTH_32); - SYNC; + if (rop == GXcopy) { + fPtr->use_mte = 1; + MAKE_ROOM(3); + WRITE4(CRIME_MTE_MODE, MTE_MODE_DST_ECC | + MTE_TLB_A << MTE_DST_TLB_SHIFT | + MTE_TLB_A << MTE_SRC_TLB_SHIFT | + MTE_DEPTH_32 << MTE_DEPTH_SHIFT); + WRITE4(CRIME_MTE_DST_Y_STEP, 1); + WRITE4(CRIME_MTE_BG, colour << 8); + SYNCMTE; + } else { + fPtr->use_mte = 0; + MAKE_ROOM(7); + WRITE4(CRIME_DE_PLANEMASK, planemask); + WRITE4(CRIME_DE_ROP, rop); + WRITE4(CRIME_DE_FG, colour << 8); + WRITE4(CRIME_DE_DRAWMODE, + DE_DRAWMODE_PLANEMASK | DE_DRAWMODE_BYTEMASK | + DE_DRAWMODE_ROP |\ + DE_DRAWMODE_SCISSOR_EN); + WRITE4(CRIME_DE_PRIMITIVE, + DE_PRIM_RECTANGLE | DE_PRIM_LR | DE_PRIM_TB); + WRITE4(CRIME_DE_MODE_DST, DE_MODE_TLB_A | DE_MODE_BUFDEPTH_32 | + DE_MODE_TYPE_RGBA | DE_MODE_PIXDEPTH_32); + SYNC; + } DONE(CRIME_DEBUG_RECTFILL); } @@ -256,10 +266,17 @@ CrimePtr fPtr = CRIMEPTR(pScrn); LOG(CRIME_DEBUG_RECTFILL); - MAKE_ROOM(2); - WRITE4(CRIME_DE_X_VERTEX_0, (x << 16) | (y & 0x)); - WRITE4ST(CRIME_DE_X_VERTEX_1, - ((x + w - 1) << 16) | ((y + h - 1) & 0x)); + if (fPtr->use_mte) { + MAKE_ROOM(2); + WRITE4(CRIME_MTE_DST0, (x << 18) | (y & 0x)); + WRITE4ST(CRIME_MTE_DST1, + x + w) << 2) - 1 ) << 16) | ((y + h - 1) & 0x)); + } else { + MAKE_ROOM(2); + WRITE4(CRIME_DE_X_VERTEX_0, (x << 16) | (y & 0x)); + WRITE4ST(CRIME_DE_X_VERTEX_1, + ((x + w - 1) << 16) | ((y + h - 1) & 0x)); + } DONE(CRIME_DEBUG_RECTFILL); }
CVS commit: src/sys/dev
Module Name:src Committed By: dyoung Date: Tue Apr 7 22:30:09 UTC 2009 Modified Files: src/sys/dev/ic: attimer.c attimervar.h src/sys/dev/isa: pcppi.c Log Message: Make pcppi(4) detach the "speaker" from attimer(4), so that the corresponding attimer(4) resource is not perpetually busy: now it is possible to detach and to reattach pcppi(4). Make attimer(4)'s device-detachment hook return EBUSY if pcppi(4) is still attached, so that pcppi(4) cannot end up with a dangling pointer to attimer(4). To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/dev/ic/attimer.c cvs rdiff -u -r1.6 -r1.7 src/sys/dev/ic/attimervar.h cvs rdiff -u -r1.33 -r1.34 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/ic/attimer.c diff -u src/sys/dev/ic/attimer.c:1.9 src/sys/dev/ic/attimer.c:1.10 --- src/sys/dev/ic/attimer.c:1.9 Thu Jun 12 22:30:30 2008 +++ src/sys/dev/ic/attimer.c Tue Apr 7 22:30:09 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: attimer.c,v 1.9 2008/06/12 22:30:30 cegger Exp $ */ +/* $NetBSD: attimer.c,v 1.10 2009/04/07 22:30:09 dyoung Exp $ */ /* * Copyright (c) 2005 The NetBSD Foundation. @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: attimer.c,v 1.9 2008/06/12 22:30:30 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: attimer.c,v 1.10 2009/04/07 22:30:09 dyoung Exp $"); #include #include @@ -62,6 +62,9 @@ attimer_detach(device_t self, int flags) { struct attimer_softc *sc = device_private(self); + + if ((sc->sc_flags & ATT_ATTACHED) != 0) + return EBUSY; pmf_device_deregister(self); sc->sc_flags &= ~ATT_CONFIGURED; @@ -98,6 +101,14 @@ } void +attimer_detach_speaker(device_t dev) +{ + struct attimer_softc *sc = device_private(dev); + + sc->sc_flags &= ~ATT_ATTACHED; +} + +void attimer_set_pitch(device_t dev, int pitch) { struct attimer_softc *sc = device_private(dev); Index: src/sys/dev/ic/attimervar.h diff -u src/sys/dev/ic/attimervar.h:1.6 src/sys/dev/ic/attimervar.h:1.7 --- src/sys/dev/ic/attimervar.h:1.6 Tue Apr 29 06:53:02 2008 +++ src/sys/dev/ic/attimervar.h Tue Apr 7 22:30:09 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: attimervar.h,v 1.6 2008/04/29 06:53:02 martin Exp $ */ +/* $NetBSD: attimervar.h,v 1.7 2009/04/07 22:30:09 dyoung Exp $ */ /* * Copyright (c) 2005 The NetBSD Foundation. @@ -39,4 +39,5 @@ void attimer_attach(struct attimer_softc *); int attimer_detach(device_t, int); device_t attimer_attach_speaker(void); +void attimer_detach_speaker(device_t); void attimer_set_pitch(device_t, int); Index: src/sys/dev/isa/pcppi.c diff -u src/sys/dev/isa/pcppi.c:1.33 src/sys/dev/isa/pcppi.c:1.34 --- src/sys/dev/isa/pcppi.c:1.33 Sat Mar 14 11:08:28 2009 +++ src/sys/dev/isa/pcppi.c Tue Apr 7 22:30:09 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pcppi.c,v 1.33 2009/03/14 11:08:28 ad Exp $ */ +/* $NetBSD: pcppi.c,v 1.34 2009/04/07 22:30:09 dyoung Exp $ */ /* * Copyright (c) 1996 Carnegie-Mellon University. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pcppi.c,v 1.33 2009/03/14 11:08:28 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pcppi.c,v 1.34 2009/04/07 22:30:09 dyoung Exp $"); #include "attimer.h" @@ -68,6 +68,7 @@ #if NATTIMER > 0 static void pcppi_attach_speaker(device_t); +static void pcppi_detach_speaker(struct pcppi_softc *); #endif #define PCPPIPRI (PZERO - 1) @@ -180,6 +181,10 @@ int rc; struct pcppi_softc *sc = device_private(self); +#if NATTIMER > 0 + pcppi_detach_speaker(sc); +#endif + if ((rc = config_detach_children(sc->sc_dv, flags)) != 0) return rc; @@ -234,6 +239,15 @@ #if NATTIMER > 0 static void +pcppi_detach_speaker(struct pcppi_softc *sc) +{ + if (sc->sc_timer != NULL) { + attimer_detach_speaker(sc->sc_timer); + sc->sc_timer = NULL; + } +} + +static void pcppi_attach_speaker(device_t self) { struct pcppi_softc *sc = device_private(self);
CVS commit: src/external/gpl2/xcvs
Module Name:src Committed By: christos Date: Tue Apr 7 22:10:35 UTC 2009 Update of /cvsroot/src/external/gpl2/xcvs In directory ivanova.netbsd.org:/tmp/cvs-serv26828 Log Message: from ftp.gnu.org Status: Vendor Tag: NONGNU Release Tags: CVS1_12_13 N src/external/gpl2/xcvs/ABOUT-NLS N src/external/gpl2/xcvs/AUTHORS N src/external/gpl2/xcvs/BUGS N src/external/gpl2/xcvs/COPYING N src/external/gpl2/xcvs/COPYING.LIB N src/external/gpl2/xcvs/ChangeLog N src/external/gpl2/xcvs/ChangeLog.zoo N src/external/gpl2/xcvs/DEVEL-CVS N src/external/gpl2/xcvs/FAQ N src/external/gpl2/xcvs/HACKING N src/external/gpl2/xcvs/INSTALL N src/external/gpl2/xcvs/MINOR-BUGS N src/external/gpl2/xcvs/Makefile.am N src/external/gpl2/xcvs/Makefile.in N src/external/gpl2/xcvs/NEWS N src/external/gpl2/xcvs/PROJECTS N src/external/gpl2/xcvs/README N src/external/gpl2/xcvs/README.VMS N src/external/gpl2/xcvs/TESTS N src/external/gpl2/xcvs/TODO N src/external/gpl2/xcvs/aclocal.m4 N src/external/gpl2/xcvs/config.h.in N src/external/gpl2/xcvs/configure N src/external/gpl2/xcvs/configure.in N src/external/gpl2/xcvs/cvs-format.el N src/external/gpl2/xcvs/cvs.spec.in N src/external/gpl2/xcvs/mktemp.sh N src/external/gpl2/xcvs/.cvsignore N src/external/gpl2/xcvs/build-aux/config.guess N src/external/gpl2/xcvs/build-aux/compile N src/external/gpl2/xcvs/build-aux/config.rpath N src/external/gpl2/xcvs/build-aux/config.sub N src/external/gpl2/xcvs/build-aux/depcomp N src/external/gpl2/xcvs/build-aux/install-sh N src/external/gpl2/xcvs/build-aux/mdate-sh N src/external/gpl2/xcvs/build-aux/missing N src/external/gpl2/xcvs/build-aux/texinfo.tex N src/external/gpl2/xcvs/build-aux/ylwrap N src/external/gpl2/xcvs/contrib/Makefile.am N src/external/gpl2/xcvs/contrib/README N src/external/gpl2/xcvs/contrib/commit_prep.in N src/external/gpl2/xcvs/contrib/Makefile.in N src/external/gpl2/xcvs/contrib/clmerge.in N src/external/gpl2/xcvs/contrib/cln_hist.in N src/external/gpl2/xcvs/contrib/validate_repo.in N src/external/gpl2/xcvs/contrib/cvs_acls.in N src/external/gpl2/xcvs/contrib/log.in N src/external/gpl2/xcvs/contrib/log_accum.in N src/external/gpl2/xcvs/contrib/mfpipe.in N src/external/gpl2/xcvs/contrib/pvcs2rcs.in N src/external/gpl2/xcvs/contrib/rcs2log.sh N src/external/gpl2/xcvs/contrib/rcslock.in N src/external/gpl2/xcvs/contrib/sccs2rcs.in N src/external/gpl2/xcvs/contrib/ChangeLog N src/external/gpl2/xcvs/contrib/intro.doc N src/external/gpl2/xcvs/contrib/rcs2log.1 N src/external/gpl2/xcvs/contrib/rcs-5.7-commitid.patch N src/external/gpl2/xcvs/contrib/sandbox_status.man N src/external/gpl2/xcvs/contrib/cvs2vendor.sh N src/external/gpl2/xcvs/contrib/cvshelp.man N src/external/gpl2/xcvs/contrib/sandbox_status.sh N src/external/gpl2/xcvs/contrib/cvs_acls.html N src/external/gpl2/xcvs/contrib/debug_check_log.sh N src/external/gpl2/xcvs/contrib/descend.sh N src/external/gpl2/xcvs/contrib/descend.man N src/external/gpl2/xcvs/contrib/dirfns.shar N src/external/gpl2/xcvs/contrib/newcvsroot.sh N src/external/gpl2/xcvs/contrib/rcs-to-cvs.sh N src/external/gpl2/xcvs/contrib/rcs2sccs.sh N src/external/gpl2/xcvs/contrib/pam/Makefile.am N src/external/gpl2/xcvs/contrib/pam/Makefile.in N src/external/gpl2/xcvs/contrib/pam/ChangeLog N src/external/gpl2/xcvs/contrib/pam/.cvsignore N src/external/gpl2/xcvs/contrib/pam/cvs.linux N src/external/gpl2/xcvs/contrib/pam/cvs.solaris N src/external/gpl2/xcvs/diff/Makefile.am N src/external/gpl2/xcvs/diff/README N src/external/gpl2/xcvs/diff/build_diff.com N src/external/gpl2/xcvs/diff/Makefile.in N src/external/gpl2/xcvs/diff/ChangeLog N src/external/gpl2/xcvs/diff/diff.c N src/external/gpl2/xcvs/diff/diff3.c N src/external/gpl2/xcvs/diff/analyze.c N src/external/gpl2/xcvs/diff/cmpbuf.c N src/external/gpl2/xcvs/diff/cmpbuf.h N src/external/gpl2/xcvs/diff/io.c N src/external/gpl2/xcvs/diff/context.c N src/external/gpl2/xcvs/diff/ed.c N src/external/gpl2/xcvs/diff/normal.c N src/external/gpl2/xcvs/diff/ifdef.c N src/external/gpl2/xcvs/diff/util.c N src/external/gpl2/xcvs/diff/dir.c N src/external/gpl2/xcvs/diff/version.c N src/external/gpl2/xcvs/diff/diff.h N src/external/gpl2/xcvs/diff/side.c N src/external/gpl2/xcvs/diff/system.h N src/external/gpl2/xcvs/diff/diffrun.h N src/external/gpl2/xcvs/diff/diagmeet.note N src/external/gpl2/xcvs/diff/libdiff.dep N src/external/gpl2/xcvs/diff/libdiff.dsp N src/external/gpl2/xcvs/diff/libdiff.mak N src/external/gpl2/xcvs/doc/version-client.texi N src/external/gpl2/xcvs/doc/Makefile.am N src/external/gpl2/xcvs/doc/Makefile.in N src/external/gpl2/xcvs/doc/mkman.pl N src/external/gpl2/xcvs/doc/stamp-1 N src/external/gpl2/xcvs/doc/stamp-vti N src/external/gpl2/xcvs/doc/cvsclient.texi N src/external/gpl2/xcvs/doc/version.texi N src/external/gpl2/xcvs/doc/ChangeLog N src/external/gpl2/xcvs/doc/mdate-sh N src/external/gpl2/xcvs/doc/cvs.texinfo N src/external/gpl2/xcvs/doc/ChangeLog.fsf N src/external/gpl2/xcvs/doc/cvs.man.header N src/external/gpl2/x
CVS commit: src/usr.bin/xinstall
Module Name:src Committed By: apb Date: Tue Apr 7 22:07:54 UTC 2009 Modified Files: src/usr.bin/xinstall: xinstall.c Log Message: Changes for installing with a metalog: * When installing hard links and using a metalog, if -o, -g, -m, or -f args were explicitly specified on the command line, then believe them, but do not implicitly believe uname/gname/mode/flags from the file system. * Output fields in the same order used by mtree. To generate a diff of this commit: cvs rdiff -u -r1.105 -r1.106 src/usr.bin/xinstall/xinstall.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/xinstall/xinstall.c diff -u src/usr.bin/xinstall/xinstall.c:1.105 src/usr.bin/xinstall/xinstall.c:1.106 --- src/usr.bin/xinstall/xinstall.c:1.105 Sun Dec 28 18:38:27 2008 +++ src/usr.bin/xinstall/xinstall.c Tue Apr 7 22:07:54 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: xinstall.c,v 1.105 2008/12/28 18:38:27 christos Exp $ */ +/* $NetBSD: xinstall.c,v 1.106 2009/04/07 22:07:54 apb Exp $ */ /* * Copyright (c) 1987, 1993 @@ -46,7 +46,7 @@ #if 0 static char sccsid[] = "@(#)xinstall.c 8.1 (Berkeley) 7/21/93"; #else -__RCSID("$NetBSD: xinstall.c,v 1.105 2008/12/28 18:38:27 christos Exp $"); +__RCSID("$NetBSD: xinstall.c,v 1.106 2009/04/07 22:07:54 apb Exp $"); #endif #endif /* not lint */ @@ -83,6 +83,7 @@ #define BACKUP_SUFFIX ".old" int dobackup, dodir, dostrip, dolink, dopreserve, dorename, dounpriv; +int haveopt_f, haveopt_g, haveopt_m, haveopt_o; int numberedbackup; int mode = S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH; char pathbuf[MAXPATHLEN]; @@ -125,7 +126,7 @@ int main(int, char *[]); void makelink(char *, char *); void metadata_log(const char *, const char *, struct timeval *, - const char *, const char *); + const char *, const char *, off_t); int parseid(char *, id_t *); void strip(char *); void usage(void); @@ -184,10 +185,12 @@ break; #if ! HAVE_NBTOOL_CONFIG_H case 'f': + haveopt_f = 1; fflags = optarg; break; #endif case 'g': + haveopt_g = 1; group = optarg; break; case 'h': @@ -222,6 +225,7 @@ } break; case 'm': + haveopt_m = 1; if (!(set = setmode(optarg))) err(1, "Cannot set file mode `%s'", optarg); mode = getmode(set, 0); @@ -237,6 +241,7 @@ optarg); break; case 'o': + haveopt_o = 1; owner = optarg; break; case 'p': @@ -471,20 +476,29 @@ if (stat(to_name, &to_sb)) err(1, "%s: stat", to_name); if (S_ISREG(to_sb.st_mode)) { - /* XXX: only metalog hardlinked files */ + /* XXX: hard links to anything + * other than plain files are not + * metalogged + */ int omode; char *oowner, *ogroup, *offlags; char *dres; - /* XXX: use underlying perms */ + /* XXX: use underlying perms, + * unless overridden on command line. + */ omode = mode; -mode = (to_sb.st_mode & 0777); +if (!haveopt_m) + mode = (to_sb.st_mode & 0777); oowner = owner; -owner = NULL; +if (!haveopt_o) + owner = NULL; ogroup = group; -group = NULL; +if (!haveopt_g) + group = NULL; offlags = fflags; -fflags = NULL; +if (!haveopt_f) + fflags = NULL; switch (digesttype) { case DIGEST_MD5: dres = MD5File(from_name, NULL); @@ -498,7 +512,8 @@ default: dres = NULL; } -metadata_log(to_name, "file", NULL, NULL, dres); +metadata_log(to_name, "file", NULL, NULL, +dres, to_sb.st_size); free(dres); mode = omode; owner = oowner; @@ -516,7 +531,7 @@ err(1, "%s: realpath", from_name); do_symlink(src, to_name); /* XXX: src may point outside of destdir */ - metadata_log(to_name, "link", NULL, src, NULL); + metadata_log(to_name, "link", NULL, src, NULL, 0); return; } @@ -558,7 +573,7 @@ do_symlink(lnk, to_name); /* XXX: lnk may point outside of destdir */ - metadata_log(to_name, "link", NULL, lnk, NULL); + metadata_log(to_name, "link", NULL, lnk, NULL, 0); return; } @@ -568,7 +583,7 @@ */ do_symlink(from_name, to_name); /* XXX: from_name may point outside of destdir */ - metadata_log(to_name, "link", NULL, from_name, NULL); + metadata_log(to_name, "link", NULL, from_name, NULL, 0); } /* @@ -746,7 +761,8 @@ } #endif - metadata_log(to_name, "file", tv, NULL, digestresult); + metadata_log(to_name, "file", tv, NULL, digestresult, + (devnull ? 0 : from_sb.st_size)); free(digestresult); } @@ -1037,17 +1053,18 @@ || chmod(path, mode) == -1 )) { warn("%s: chown/chmod", path); } - metadata_log(path, "dir", NULL, NULL, NULL); + metadata_log(path, "dir", NULL, NULL, NULL, 0); } /* * metadata_log -- * if metafp is not NULL, output mtree(8) full path name and settings to - * metafp, to allow permissions to be set correctly by other tools. + * metafp, to allow permi
CVS commit: src/sys/arch/i386/i386
Module Name:src Committed By: dyoung Date: Tue Apr 7 22:01:39 UTC 2009 Modified Files: src/sys/arch/i386/i386: mainbus.c Log Message: Let us re-attach acpi0, ipmi0, pnpbios0, and mca0 at mainbus0. Extract code from mainbus_attach() to create a rescan hook, mainbus_rescan(). Call mainbus_rescan(, "acpibus"/"ipmibus"/..., ) from mainbus_attach() in the precise places where we used to attach acpi0, ipmi0, pnpbios0, and mca0. This allows, for example, ipmi0 to detach and re-attach: # drvctl -d ipmi0 ipmi0: detached # drvctl -r -a ipmibus mainbus0 ipmi0 at mainbus0 # Future work will let us detach & re-attach CPUs and the ISA/PCI/EISA buses at mainbus0. To generate a diff of this commit: cvs rdiff -u -r1.81 -r1.82 src/sys/arch/i386/i386/mainbus.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/i386/i386/mainbus.c diff -u src/sys/arch/i386/i386/mainbus.c:1.81 src/sys/arch/i386/i386/mainbus.c:1.82 --- src/sys/arch/i386/i386/mainbus.c:1.81 Sat Mar 14 15:36:07 2009 +++ src/sys/arch/i386/i386/mainbus.c Tue Apr 7 22:01:38 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.81 2009/03/14 15:36:07 dsl Exp $ */ +/* $NetBSD: mainbus.c,v 1.82 2009/04/07 22:01:38 dyoung Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.81 2009/03/14 15:36:07 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.82 2009/04/07 22:01:38 dyoung Exp $"); #include #include @@ -95,11 +95,24 @@ #endif void mainbus_childdetached(device_t, device_t); -int mainbus_match(struct device *, struct cfdata *, void *); -void mainbus_attach(struct device *, struct device *, void *); +int mainbus_match(device_t, cfdata_t, void *); +void mainbus_attach(device_t, device_t, void *); +void mainbus_attach(device_t, device_t, void *); + +static int mainbus_rescan(device_t, const char *, const int *); + +struct mainbus_softc { + device_t sc_acpi; + device_t sc_dev; + device_t sc_ipmi; + device_t sc_mca; + device_t sc_pnpbios; + bool sc_acpi_present; +}; -CFATTACH_DECL2_NEW(mainbus, 0, -mainbus_match, mainbus_attach, NULL, NULL, NULL, mainbus_childdetached); +CFATTACH_DECL2_NEW(mainbus, sizeof(struct mainbus_softc), +mainbus_match, mainbus_attach, NULL, NULL, mainbus_rescan, +mainbus_childdetached); int mainbus_print(void *, const char *); @@ -163,14 +176,23 @@ void mainbus_childdetached(device_t self, device_t child) { - /* mainbus holds no pointers to its children, so this is ok */ + struct mainbus_softc *sc = device_private(self); + + if (sc->sc_acpi == child) + sc->sc_acpi = NULL; + if (sc->sc_ipmi == child) + sc->sc_ipmi = NULL; + if (sc->sc_mca == child) + sc->sc_mca = NULL; + if (sc->sc_pnpbios == child) + sc->sc_pnpbios = NULL; } /* * Probe for the mainbus; always succeeds. */ int -mainbus_match(struct device *parent, struct cfdata *match, void *aux) +mainbus_match(device_t parent, cfdata_t match, void *aux) { return 1; @@ -180,12 +202,10 @@ * Attach the mainbus. */ void -mainbus_attach(struct device *parent, struct device *self, void *aux) +mainbus_attach(device_t parent, device_t self, void *aux) { + struct mainbus_softc *sc = device_private(self); union mainbus_attach_args mba; -#if NACPI > 0 - int acpi_present = 0; -#endif #ifdef MPBIOS int mpbios_present = 0; #endif @@ -195,6 +215,8 @@ int mpacpi_active = 0; int numcpus = 0; + sc->sc_dev = self; + aprint_naive("\n"); aprint_normal("\n"); @@ -223,13 +245,13 @@ #if NACPI > 0 if ((boothowto & RB_MD2) == 0 && acpi_check(self, "acpibus")) - acpi_present = acpi_probe(); + sc->sc_acpi_present = acpi_probe() != 0; /* * First, see if the MADT contains CPUs, and possibly I/O APICs. * Building the interrupt routing structures can only * be done later (via a callback). */ - if (acpi_present) + if (sc->sc_acpi_present) mpacpi_active = mpacpi_scan_apics(self, &numcpus); #endif @@ -259,46 +281,12 @@ self); #endif -#if NACPI > 0 - if (acpi_present) { - mba.mba_acpi.aa_iot = X86_BUS_SPACE_IO; - mba.mba_acpi.aa_memt = X86_BUS_SPACE_MEM; - mba.mba_acpi.aa_pc = NULL; - mba.mba_acpi.aa_pciflags = - PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED | - PCI_FLAGS_MRL_OKAY | PCI_FLAGS_MRM_OKAY | - PCI_FLAGS_MWI_OKAY; - mba.mba_acpi.aa_ic = &x86_isa_chipset; - config_found_ia(self, "acpibus", &mba.mba_acpi, 0); -#if 0 /* XXXJRT not yet */ - if (acpi_active) { - /* - * ACPI already did all the work for us, there - * is nothing more for us to do. - */ - return; - } -#endif - } -#endif + mainbus_rescan(self, "acpibus", NULL); -#if NPNPBIOS > 0 -#if NACPI > 0 - if (acpi_active == 0) -#endif - if (pnpbios_probe()) { - mba.mba_paa.paa_ic = &x86_isa_chipset; - config_found_ia(self, "pnpbiosbus", &mba.mba_paa, 0); - } -#endif + mainbus_rescan(self,
CVS commit: src/sys/dev/sysmon
Module Name:src Committed By: dyoung Date: Tue Apr 7 21:49:36 UTC 2009 Modified Files: src/sys/dev/sysmon: sysmon_envsys_events.c Log Message: Fix spelling: mak -> make. To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.63 src/sys/dev/sysmon/sysmon_envsys_events.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_events.c diff -u src/sys/dev/sysmon/sysmon_envsys_events.c:1.62 src/sys/dev/sysmon/sysmon_envsys_events.c:1.63 --- src/sys/dev/sysmon/sysmon_envsys_events.c:1.62 Tue Nov 11 19:03:06 2008 +++ src/sys/dev/sysmon/sysmon_envsys_events.c Tue Apr 7 21:49:36 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: sysmon_envsys_events.c,v 1.62 2008/11/11 19:03:06 pgoyette Exp $ */ +/* $NetBSD: sysmon_envsys_events.c,v 1.63 2009/04/07 21:49:36 dyoung Exp $ */ /*- * Copyright (c) 2007, 2008 Juan Romero Pardines. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys_events.c,v 1.62 2008/11/11 19:03:06 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys_events.c,v 1.63 2009/04/07 21:49:36 dyoung Exp $"); #include #include @@ -567,7 +567,7 @@ see->see_flags |= SEE_EVENT_WORKING; /* * sme_events_check marks the first event for the device to - * mak us refresh it here. Don't refresh if the driver uses + * make us refresh it here. Don't refresh if the driver uses * its own method for refreshing. */ if ((sme->sme_flags & SME_DISABLE_REFRESH) == 0) {
CVS commit: src/sys/dev/isa
Module Name:src Committed By: dyoung Date: Tue Apr 7 21:48:46 UTC 2009 Modified Files: src/sys/dev/isa: isa.c Log Message: Fix spelling: indrect -> indirect. To generate a diff of this commit: cvs rdiff -u -r1.134 -r1.135 src/sys/dev/isa/isa.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/isa.c diff -u src/sys/dev/isa/isa.c:1.134 src/sys/dev/isa/isa.c:1.135 --- src/sys/dev/isa/isa.c:1.134 Mon Apr 28 20:23:52 2008 +++ src/sys/dev/isa/isa.c Tue Apr 7 21:48:46 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: isa.c,v 1.134 2008/04/28 20:23:52 martin Exp $ */ +/* $NetBSD: isa.c,v 1.135 2009/04/07 21:48:46 dyoung Exp $ */ /*- * Copyright (c) 1998, 2001, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: isa.c,v 1.134 2008/04/28 20:23:52 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isa.c,v 1.135 2009/04/07 21:48:46 dyoung Exp $"); #include #include @@ -130,7 +130,7 @@ if (sc->sc_dynamicdevs == 0) isa_free_knowndevs(sc); - /* Attach all indrect-config children. */ + /* Attach all indirect-config children. */ isarescan(self, "isa", wildcard); if (!pmf_device_register(self, NULL, NULL))
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: dyoung Date: Tue Apr 7 21:47:58 UTC 2009 Modified Files: src/sys/arch/x86/x86: ipmi.c Log Message: When ipmi0 detaches, free all of the ipmi_sensor's on the (global!) ipmi_sensor_list. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/arch/x86/x86/ipmi.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/ipmi.c diff -u src/sys/arch/x86/x86/ipmi.c:1.31 src/sys/arch/x86/x86/ipmi.c:1.32 --- src/sys/arch/x86/x86/ipmi.c:1.31 Tue Apr 7 21:00:30 2009 +++ src/sys/arch/x86/x86/ipmi.c Tue Apr 7 21:47:58 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ipmi.c,v 1.31 2009/04/07 21:00:30 dyoung Exp $ */ +/* $NetBSD: ipmi.c,v 1.32 2009/04/07 21:47:58 dyoung Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -57,7 +57,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ipmi.c,v 1.31 2009/04/07 21:00:30 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipmi.c,v 1.32 2009/04/07 21:47:58 dyoung Exp $"); #include #include @@ -1859,6 +1859,7 @@ static int ipmi_detach(device_t self, int flags) { + struct ipmi_sensor *i; int rc; struct ipmi_softc *sc = device_private(self); @@ -1887,6 +1888,11 @@ sc->sc_envsys = NULL; } + while ((i = SLIST_FIRST(&ipmi_sensor_list)) != NULL) { + SLIST_REMOVE_HEAD(&ipmi_sensor_list, i_list); + free(i, M_DEVBUF); + } + if (sc->sc_sensor != NULL) { free(sc->sc_sensor, M_DEVBUF); sc->sc_sensor = NULL;
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: dyoung Date: Tue Apr 7 21:00:31 UTC 2009 Modified Files: src/sys/arch/x86/x86: ipmi.c Log Message: In ipmi_detach(), don't sysmon_envsys_destroy(), but just _unregister(): _unregister() calls _destroy(). To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/arch/x86/x86/ipmi.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/ipmi.c diff -u src/sys/arch/x86/x86/ipmi.c:1.30 src/sys/arch/x86/x86/ipmi.c:1.31 --- src/sys/arch/x86/x86/ipmi.c:1.30 Tue Apr 7 17:53:45 2009 +++ src/sys/arch/x86/x86/ipmi.c Tue Apr 7 21:00:30 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ipmi.c,v 1.30 2009/04/07 17:53:45 dyoung Exp $ */ +/* $NetBSD: ipmi.c,v 1.31 2009/04/07 21:00:30 dyoung Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -57,7 +57,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ipmi.c,v 1.30 2009/04/07 17:53:45 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipmi.c,v 1.31 2009/04/07 21:00:30 dyoung Exp $"); #include #include @@ -1881,10 +1881,9 @@ ipmi_enabled = 0; - sysmon_envsys_unregister(sc->sc_envsys); - if (sc->sc_envsys != NULL) { - sysmon_envsys_destroy(sc->sc_envsys); + /* _unregister also destroys */ + sysmon_envsys_unregister(sc->sc_envsys); sc->sc_envsys = NULL; }
CVS commit: src/tests/fs/tmpfs
Module Name:src Committed By: pooka Date: Tue Apr 7 20:51:46 UTC 2009 Modified Files: src/tests/fs/tmpfs: Atffile Makefile Added Files: src/tests/fs/tmpfs: t_renamerace.c Log Message: add regression test for kern/41128 To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/fs/tmpfs/Atffile cvs rdiff -u -r1.2 -r1.3 src/tests/fs/tmpfs/Makefile cvs rdiff -u -r0 -r1.1 src/tests/fs/tmpfs/t_renamerace.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/fs/tmpfs/Atffile diff -u src/tests/fs/tmpfs/Atffile:1.4 src/tests/fs/tmpfs/Atffile:1.5 --- src/tests/fs/tmpfs/Atffile:1.4 Sun Dec 30 09:13:32 2007 +++ src/tests/fs/tmpfs/Atffile Tue Apr 7 20:51:46 2009 @@ -1,5 +1,5 @@ Content-Type: application/X-atf-atffile; version="1" -X-NetBSD-Id: "$NetBSD: Atffile,v 1.4 2007/12/30 09:13:32 jmmv Exp $" +X-NetBSD-Id: "$NetBSD: Atffile,v 1.5 2009/04/07 20:51:46 pooka Exp $" prop: test-suite = "NetBSD" @@ -28,3 +28,4 @@ tp: t_sockets tp: t_readdir tp: t_vnd +tp: t_renamerace Index: src/tests/fs/tmpfs/Makefile diff -u src/tests/fs/tmpfs/Makefile:1.2 src/tests/fs/tmpfs/Makefile:1.3 --- src/tests/fs/tmpfs/Makefile:1.2 Wed Nov 21 15:39:34 2007 +++ src/tests/fs/tmpfs/Makefile Tue Apr 7 20:51:46 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2007/11/21 15:39:34 jmmv Exp $ +# $NetBSD: Makefile,v 1.3 2009/04/07 20:51:46 pooka Exp $ TESTSDIR= ${TESTSBASE}/fs/tmpfs @@ -28,6 +28,10 @@ TESTS_SH+= t_vnd TESTS_SH+= t_vnode_leak +TESTS_C+= t_renamerace + +LDADD.t_renamerace+= -lukfs -lrumpfs_tmpfs -lrumpvfs -lrump -lrumpuser -lpthread + FILES= h_funcs.subr FILESDIR= ${TESTSDIR} Added files: Index: src/tests/fs/tmpfs/t_renamerace.c diff -u /dev/null src/tests/fs/tmpfs/t_renamerace.c:1.1 --- /dev/null Tue Apr 7 20:51:46 2009 +++ src/tests/fs/tmpfs/t_renamerace.c Tue Apr 7 20:51:46 2009 @@ -0,0 +1,87 @@ +/* $NetBSD: t_renamerace.c,v 1.1 2009/04/07 20:51:46 pooka Exp $ */ + +/* + * Modified for rump and atf from a program supplied + * by Nicolas Joly in kern/40948 + */ + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#define NROUND (1<<16) /* usually triggered with this amount of rounds */ + +ATF_TC(renamerace); +ATF_TC_HEAD(renamerace, tc) +{ + atf_tc_set_md_var(tc, "descr", "rename(2) race against files " + "unlinked mid-operation, kern/41128"); +} + +void * +w1(void *arg) +{ + int fd, i; + + for (i = 0; i < NROUND; i++) { +fd = rump_sys_open("/rename.test1", O_WRONLY|O_CREAT|O_TRUNC, 0666); +rump_sys_unlink("/rename.test1"); +rump_sys_close(fd); + } + return NULL; +} + +ATF_TC_BODY(renamerace, tc) +{ + struct tmpfs_args args; + struct ukfs *fs; + pthread_t pt; + int fail = 0, succ = 0, i; + + memset(&args, 0, sizeof(args)); + args.ta_version = TMPFS_ARGS_VERSION; + args.ta_root_mode = 0777; + + ukfs_init(); + fs = ukfs_mount(MOUNT_TMPFS, "tmpfs", UKFS_DEFAULTMP, 0, &args, sizeof(args)); + if (fs == NULL) +err(1, "ukfs_mount"); + + pthread_create(&pt, NULL, w1, fs); + + for (i = 0; i < NROUND; i++) { +int rv; +rv = rump_sys_rename("/rename.test1", "/rename.test2"); +#if 0 +if (rv == 0) { + if (succ++ % 1 == 0) +printf("success\n"); +} else { + if (fail++ % 1 == 0) +printf("fail\n"); +} +#endif + } + + pthread_join(pt, NULL); + ukfs_release(fs, 0); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, renamerace); +}
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: snj Date: Tue Apr 7 20:49:29 UTC 2009 Modified Files: src/doc [netbsd-5]: CHANGES-5.0 Log Message: Back out ticket 654. To generate a diff of this commit: cvs rdiff -u -r1.1.2.127 -r1.1.2.128 src/doc/CHANGES-5.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.0 diff -u src/doc/CHANGES-5.0:1.1.2.127 src/doc/CHANGES-5.0:1.1.2.128 --- src/doc/CHANGES-5.0:1.1.2.127 Sat Apr 4 23:56:06 2009 +++ src/doc/CHANGES-5.0 Tue Apr 7 20:49:29 2009 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.0,v 1.1.2.127 2009/04/04 23:56:06 snj Exp $ +# $NetBSD: CHANGES-5.0,v 1.1.2.128 2009/04/07 20:49:29 snj Exp $ A complete list of changes from the initial NetBSD 5.0 branch on October 2008 until the 5.0 release: @@ -5708,13 +5708,6 @@ to the underlying disk. Addresses PR 41016. [apb, ticket #653] -distrib/sets/maketars1.66 - - Explicitly sort entries on preparing set files from METALOG. - METALOG could have different order due to install(1) race - on parallel builds, and mtree(8) doesn't sort files. - [tsutsui, ticket #654] - sys/ufs/ffs/ffs_vfsops.c 1.245 via patch sys/ufs/ffs/ffs_vnops.c1.112 via patch
CVS commit: [netbsd-5] src/distrib/sets
Module Name:src Committed By: snj Date: Tue Apr 7 20:48:40 UTC 2009 Modified Files: src/distrib/sets [netbsd-5]: maketars Log Message: Back out ticket 654, as it exposes issues with mtree's handling of hard links. To generate a diff of this commit: cvs rdiff -u -r1.64.6.1 -r1.64.6.2 src/distrib/sets/maketars Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/maketars diff -u src/distrib/sets/maketars:1.64.6.1 src/distrib/sets/maketars:1.64.6.2 --- src/distrib/sets/maketars:1.64.6.1 Sat Apr 4 17:22:48 2009 +++ src/distrib/sets/maketars Tue Apr 7 20:48:40 2009 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: maketars,v 1.64.6.1 2009/04/04 17:22:48 snj Exp $ +# $NetBSD: maketars,v 1.64.6.2 2009/04/07 20:48:40 snj Exp $ # # Make release tar files for some or all lists. Usage: # maketars [-b] [-x] [-i installdir] [-a arch] [-m machine] [-s setsdir] @@ -148,8 +148,7 @@ ( echo "/set uname=root gname=wheel" ${AWK} -f "${rundir}/join.awk" \ -"${SDIR}/flist.${setname}.full" "${metalog}" \ -| ${SORT} -u +"${SDIR}/flist.${setname}.full" "${metalog}" echo "./etc/mtree/set.${setname} type=file mode=0444" ) > "${setlistdir}/set.${setname}" # We deliberately do not add set.${setname} to ${metalog},
CVS commit: src/distrib/sets
Module Name:src Committed By: apb Date: Tue Apr 7 20:46:21 UTC 2009 Modified Files: src/distrib/sets: sets.subr Log Message: Print debug messages only when MAKEVERBOSE >= 3, not when it is >= 2. MAKEVERBOSE=2 is teh default, and the messages are too noisy. To generate a diff of this commit: cvs rdiff -u -r1.82 -r1.83 src/distrib/sets/sets.subr Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/sets.subr diff -u src/distrib/sets/sets.subr:1.82 src/distrib/sets/sets.subr:1.83 --- src/distrib/sets/sets.subr:1.82 Sat Apr 4 10:08:08 2009 +++ src/distrib/sets/sets.subr Tue Apr 7 20:46:20 2009 @@ -1,4 +1,4 @@ -# $NetBSD: sets.subr,v 1.82 2009/04/04 10:08:08 apb Exp $ +# $NetBSD: sets.subr,v 1.83 2009/04/07 20:46:20 apb Exp $ # # @@ -227,7 +227,7 @@ # In each file, a record consists of a path and a System Package name, # separated by whitespace. E.g., # -# # $NetBSD: sets.subr,v 1.82 2009/04/04 10:08:08 apb Exp $ +# # $NetBSD: sets.subr,v 1.83 2009/04/07 20:46:20 apb Exp $ # . base-sys-root [keyword[,...]] # ./altroot base-sys-root # ./bin base-sys-root @@ -303,7 +303,7 @@ # list_set_files() { - if [ ${MAKEVERBOSE:-2} -lt 2 ]; then + if [ ${MAKEVERBOSE:-2} -lt 3 ]; then verbose=false else verbose=true
CVS commit: src/sys/rump
Module Name:src Committed By: pooka Date: Tue Apr 7 18:35:49 UTC 2009 Modified Files: src/sys/rump/include/rump: rumpuser.h src/sys/rump/librump/rumpuser: rumpuser.c src/sys/rump/librump/rumpvfs: rumpfs.c Log Message: Make it possible to use VCHR devices again. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/rump/include/rump/rumpuser.h cvs rdiff -u -r1.37 -r1.38 src/sys/rump/librump/rumpuser/rumpuser.c cvs rdiff -u -r1.10 -r1.11 src/sys/rump/librump/rumpvfs/rumpfs.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/rump/include/rump/rumpuser.h diff -u src/sys/rump/include/rump/rumpuser.h:1.20 src/sys/rump/include/rump/rumpuser.h:1.21 --- src/sys/rump/include/rump/rumpuser.h:1.20 Wed Mar 18 15:32:27 2009 +++ src/sys/rump/include/rump/rumpuser.h Tue Apr 7 18:35:49 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser.h,v 1.20 2009/03/18 15:32:27 pooka Exp $ */ +/* $NetBSD: rumpuser.h,v 1.21 2009/04/07 18:35:49 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -40,10 +40,11 @@ typedef void (*kernel_unlockfn)(int, int *); int rumpuser_getfileinfo(const char *, uint64_t *, int *, int *); +#define RUMPUSER_FT_OTHER 0 #define RUMPUSER_FT_DIR 1 #define RUMPUSER_FT_REG 2 #define RUMPUSER_FT_BLK 3 -#define RUMPUSER_FT_OTHER 4 +#define RUMPUSER_FT_CHR 4 int rumpuser_nanosleep(uint64_t *, uint64_t *, int *); #define rumpuser_malloc(a,b) rumpuser__malloc(a,b,__func__,__LINE__); Index: src/sys/rump/librump/rumpuser/rumpuser.c diff -u src/sys/rump/librump/rumpuser/rumpuser.c:1.37 src/sys/rump/librump/rumpuser/rumpuser.c:1.38 --- src/sys/rump/librump/rumpuser/rumpuser.c:1.37 Wed Mar 18 15:32:27 2009 +++ src/sys/rump/librump/rumpuser/rumpuser.c Tue Apr 7 18:35:49 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser.c,v 1.37 2009/03/18 15:32:27 pooka Exp $ */ +/* $NetBSD: rumpuser.c,v 1.38 2009/04/07 18:35:49 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -30,7 +30,7 @@ #include #if !defined(lint) -__RCSID("$NetBSD: rumpuser.c,v 1.37 2009/03/18 15:32:27 pooka Exp $"); +__RCSID("$NetBSD: rumpuser.c,v 1.38 2009/04/07 18:35:49 pooka Exp $"); #endif /* !lint */ /* thank the maker for this */ @@ -86,6 +86,9 @@ case S_IFBLK: *ft = RUMPUSER_FT_BLK; break; + case S_IFCHR: + *ft = RUMPUSER_FT_CHR; + break; default: *ft = RUMPUSER_FT_OTHER; break; Index: src/sys/rump/librump/rumpvfs/rumpfs.c diff -u src/sys/rump/librump/rumpvfs/rumpfs.c:1.10 src/sys/rump/librump/rumpvfs/rumpfs.c:1.11 --- src/sys/rump/librump/rumpvfs/rumpfs.c:1.10 Fri Mar 20 08:30:52 2009 +++ src/sys/rump/librump/rumpvfs/rumpfs.c Tue Apr 7 18:35:49 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpfs.c,v 1.10 2009/03/20 08:30:52 pooka Exp $ */ +/* $NetBSD: rumpfs.c,v 1.11 2009/04/07 18:35:49 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.10 2009/03/20 08:30:52 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.11 2009/04/07 18:35:49 pooka Exp $"); #include #include @@ -135,7 +135,7 @@ vp = kmem_alloc(sizeof(struct vnode), KM_SLEEP); vp->v_size = vp->v_writesize = size; vp->v_type = vt; - if (vp->v_type == VREG) + if (vp->v_type == VREG || vp->v_type == VCHR) vp->v_type = VBLK; if (vp->v_type != VBLK && vp->v_type != VDIR) @@ -205,6 +205,9 @@ case RUMPUSER_FT_BLK: vt = VBLK; break; + case RUMPUSER_FT_CHR: + vt = VCHR; + break; default: vt = VBAD; break;
CVS commit: src/bin/pax
Module Name:src Committed By: perry Date: Tue Apr 7 19:52:35 UTC 2009 Modified Files: src/bin/pax: extern.h file_subs.c options.c pat_rep.c pax.h Log Message: Fixes from christos for pr-41167 XXX -X is still broken, but that wasn't part of this PR. To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/bin/pax/extern.h cvs rdiff -u -r1.61 -r1.62 src/bin/pax/file_subs.c cvs rdiff -u -r1.103 -r1.104 src/bin/pax/options.c cvs rdiff -u -r1.28 -r1.29 src/bin/pax/pat_rep.c cvs rdiff -u -r1.29 -r1.30 src/bin/pax/pax.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/pax/extern.h diff -u src/bin/pax/extern.h:1.55 src/bin/pax/extern.h:1.56 --- src/bin/pax/extern.h:1.55 Sun Feb 24 20:42:46 2008 +++ src/bin/pax/extern.h Tue Apr 7 19:52:35 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.55 2008/02/24 20:42:46 joerg Exp $ */ +/* $NetBSD: extern.h,v 1.56 2009/04/07 19:52:35 perry Exp $ */ /*- * Copyright (c) 1992 Keith Muller. @@ -216,7 +216,7 @@ * pat_rep.c */ int rep_add(char *); -int pat_add(char *, char *); +int pat_add(char *, char *, int); void pat_chk(void); int pat_sel(ARCHD *); int pat_match(ARCHD *); Index: src/bin/pax/file_subs.c diff -u src/bin/pax/file_subs.c:1.61 src/bin/pax/file_subs.c:1.62 --- src/bin/pax/file_subs.c:1.61 Thu Jan 10 04:24:51 2008 +++ src/bin/pax/file_subs.c Tue Apr 7 19:52:35 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: file_subs.c,v 1.61 2008/01/10 04:24:51 tls Exp $ */ +/* $NetBSD: file_subs.c,v 1.62 2009/04/07 19:52:35 perry Exp $ */ /*- * Copyright (c) 1992 Keith Muller. @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)file_subs.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: file_subs.c,v 1.61 2008/01/10 04:24:51 tls Exp $"); +__RCSID("$NetBSD: file_subs.c,v 1.62 2009/04/07 19:52:35 perry Exp $"); #endif #endif /* not lint */ @@ -275,15 +275,9 @@ /* * We may be running as root, so we have to be sure that link target - * is not a directory, so we lstat and check + * is not a directory, so we lstat and check. XXX: This is still racy. */ - if (lstat(arcn->ln_name, &sb) < 0) { - syswarn(1, errno, "Cannot link to %s from %s", arcn->ln_name, - arcn->name); - return -1; - } - - if (S_ISDIR(sb.st_mode)) { + if (lstat(arcn->ln_name, &sb) != -1 && S_ISDIR(sb.st_mode)) { tty_warn(1, "A hard link to the directory %s is not allowed", arcn->ln_name); return -1; Index: src/bin/pax/options.c diff -u src/bin/pax/options.c:1.103 src/bin/pax/options.c:1.104 --- src/bin/pax/options.c:1.103 Sat Feb 14 08:10:06 2009 +++ src/bin/pax/options.c Tue Apr 7 19:52:35 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: options.c,v 1.103 2009/02/14 08:10:06 lukem Exp $ */ +/* $NetBSD: options.c,v 1.104 2009/04/07 19:52:35 perry 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.103 2009/02/14 08:10:06 lukem Exp $"); +__RCSID("$NetBSD: options.c,v 1.104 2009/04/07 19:52:35 perry Exp $"); #endif #endif /* not lint */ @@ -692,7 +692,7 @@ case LIST: case EXTRACT: for (; optind < argc; optind++) - if (pat_add(argv[optind], NULL) < 0) + if (pat_add(argv[optind], NULL, NOGLOB_MTCH) < 0) pax_usage(); break; case COPY: @@ -1234,7 +1234,7 @@ free(str); continue; } - if (pat_add(str, dir) < 0) + if (pat_add(str, dir, NOGLOB_MTCH) < 0) tar_usage(); sawpat = 1; } @@ -1254,7 +1254,7 @@ break; chdname = *argv++; havechd++; -} else if (pat_add(*argv++, chdname) < 0) +} else if (pat_add(*argv++, chdname, 0) < 0) tar_usage(); else sawpat = 1; @@ -1642,7 +1642,7 @@ cpio_usage(); } while ((str = getline(fp)) != NULL) { -pat_add(str, NULL); +pat_add(str, NULL, 0); } fclose(fp); if (getline_error) { @@ -1781,7 +1781,7 @@ case LIST: case EXTRACT: for (; optind < argc; optind++) - if (pat_add(argv[optind], 0) < 0) + if (pat_add(argv[optind], NULL, 0) < 0) cpio_usage(); break; case COPY: Index: src/bin/pax/pat_rep.c diff -u src/bin/pax/pat_rep.c:1.28 src/bin/pax/pat_rep.c:1.29 --- src/bin/pax/pat_rep.c:1.28 Sun Feb 24 20:42:46 2008 +++ src/bin/pax/pat_rep.c Tue Apr 7 19:52:35 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pat_rep.c,v 1.28 2008/02/24 20:42:46 joerg Exp $ */ +/* $NetBSD: pat_rep.c,v 1.29 2009/04/07 19:52:35 perry Exp $ */ /*- * Copyright (c) 1992 Keith Muller. @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)pat_rep.c 8.2 (Berkeley) 4/18/94"; #else -__RCSID("$NetBSD: pat_rep.c,v 1.28 2008/02/24 20:42:46 joerg Exp $"); +__RCSID("$NetBSD: pat_rep.c,v 1.29 2009/04/07 19:52:35 perry Exp $"); #endif #endif /* not lint */ @@ -75,7 +75,7 @@ static int rep_name(char *, size_t, int *, int); static int tty_rename(ARCHD *); static int fix_path(char *,
CVS commit: src/distrib/notes/common
Module Name:src Committed By: tez Date: Tue Apr 7 19:52:04 UTC 2009 Modified Files: src/distrib/notes/common: main Log Message: Add myself to the list of developers. To generate a diff of this commit: cvs rdiff -u -r1.439 -r1.440 src/distrib/notes/common/main Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/notes/common/main diff -u src/distrib/notes/common/main:1.439 src/distrib/notes/common/main:1.440 --- src/distrib/notes/common/main:1.439 Wed Feb 25 17:51:25 2009 +++ src/distrib/notes/common/main Tue Apr 7 19:52:04 2009 @@ -1,4 +1,4 @@ -.\" $NetBSD: main,v 1.439 2009/02/25 17:51:25 sno Exp $ +.\" $NetBSD: main,v 1.440 2009/04/07 19:52:04 tez Exp $ .\" .\" Copyright (c) 1999-2008 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -1650,6 +1650,7 @@ .It Ta Reinoud Zandijk Ta Mt rein...@netbsd.org .It Ta S.P.Zeidler Ta Mt s...@netbsd.org .It Ta Maria Zevenhoven Ta Mt mar...@netbsd.org +.It Ta Tim Zingelman Ta Mt t...@netbsd.org .It Ta Christos Zoulas Ta Mt chris...@netbsd.org .It Ta Ta .
CVS commit: src/sys/dev/scsipi
Module Name:src Committed By: dyoung Date: Tue Apr 7 18:10:45 UTC 2009 Modified Files: src/sys/dev/scsipi: scsipi_base.c Log Message: Destroy a scsipi_xfer's callout before putting it back into the pool. To generate a diff of this commit: cvs rdiff -u -r1.148 -r1.149 src/sys/dev/scsipi/scsipi_base.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/scsipi/scsipi_base.c diff -u src/sys/dev/scsipi/scsipi_base.c:1.148 src/sys/dev/scsipi/scsipi_base.c:1.149 --- src/sys/dev/scsipi/scsipi_base.c:1.148 Sun May 11 05:17:23 2008 +++ src/sys/dev/scsipi/scsipi_base.c Tue Apr 7 18:10:45 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: scsipi_base.c,v 1.148 2008/05/11 05:17:23 mlelstv Exp $ */ +/* $NetBSD: scsipi_base.c,v 1.149 2009/04/07 18:10:45 dyoung Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2002, 2003, 2004 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: scsipi_base.c,v 1.148 2008/05/11 05:17:23 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: scsipi_base.c,v 1.149 2009/04/07 18:10:45 dyoung Exp $"); #include "opt_scsi.h" @@ -499,6 +499,7 @@ SC_DEBUG(periph, SCSIPI_DB3, ("scsipi_free_xs\n")); TAILQ_REMOVE(&periph->periph_xferq, xs, device_q); + callout_destroy(&xs->xs_callout); pool_put(&scsipi_xfer_pool, xs); #ifdef DIAGNOSTIC
CVS commit: src
Module Name:src Committed By: apb Date: Tue Apr 7 19:28:41 UTC 2009 Modified Files: src/distrib/sets/lists/tests: mi src/tests/util/mtree: Makefile d_create.out t_mtree.sh Added Files: src/tests/util/mtree: d_convert.in d_convert_C.out d_convert_D.out Log Message: Add tests for "mtree -C" and "mtree -D". Add "link" keyword to previous mtree tests. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.1 -r1.2 src/tests/util/mtree/Makefile \ src/tests/util/mtree/d_create.out src/tests/util/mtree/t_mtree.sh cvs rdiff -u -r0 -r1.1 src/tests/util/mtree/d_convert.in \ src/tests/util/mtree/d_convert_C.out src/tests/util/mtree/d_convert_D.out Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.36 src/distrib/sets/lists/tests/mi:1.37 --- src/distrib/sets/lists/tests/mi:1.36 Tue Apr 7 13:52:08 2009 +++ src/distrib/sets/lists/tests/mi Tue Apr 7 19:28:40 2009 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.36 2009/04/07 13:52:08 apb Exp $ +# $NetBSD: mi,v 1.37 2009/04/07 19:28:40 apb Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -986,6 +986,9 @@ ./usr/tests/util/make/t_make tests-util-tests ./usr/tests/util/mtreetests-util-tests ./usr/tests/util/mtree/Atffile tests-util-tests +./usr/tests/util/mtree/d_convert.in tests-util-tests +./usr/tests/util/mtree/d_convert_C.out tests-util-tests +./usr/tests/util/mtree/d_convert_D.out tests-util-tests ./usr/tests/util/mtree/d_create.out tests-util-tests ./usr/tests/util/mtree/t_mtree tests-util-tests ./usr/tests/util/pstests-util-tests Index: src/tests/util/mtree/Makefile diff -u src/tests/util/mtree/Makefile:1.1 src/tests/util/mtree/Makefile:1.2 --- src/tests/util/mtree/Makefile:1.1 Tue Apr 7 13:52:08 2009 +++ src/tests/util/mtree/Makefile Tue Apr 7 19:28:40 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2009/04/07 13:52:08 apb Exp $ +# $NetBSD: Makefile,v 1.2 2009/04/07 19:28:40 apb Exp $ NOMAN= # defined @@ -9,6 +9,9 @@ TESTS_SH= t_mtree FILESDIR= ${TESTSDIR} -FILES= d_create.out +FILES+= d_convert.in +FILES+= d_convert_C.out +FILES+= d_convert_D.out +FILES+= d_create.out .include Index: src/tests/util/mtree/d_create.out diff -u src/tests/util/mtree/d_create.out:1.1 src/tests/util/mtree/d_create.out:1.2 --- src/tests/util/mtree/d_create.out:1.1 Tue Apr 7 13:52:08 2009 +++ src/tests/util/mtree/d_create.out Tue Apr 7 19:28:40 2009 @@ -6,13 +6,13 @@ # . /set type=file nlink=1 . type=dir nlink=4 -a.symlink.1 type=link +a.symlink.1 type=link link=a.file.1 top.dangling \ -type=link +type=link link=nonexistent top.file.1 size=18 \ sha256=74c53aaf0cd9543b7efad969de1058ee38859134ba467500b849811fc3513195 top.symlink.b \ -type=link +type=link link=b # ./a a type=dir nlink=4 Index: src/tests/util/mtree/t_mtree.sh diff -u src/tests/util/mtree/t_mtree.sh:1.1 src/tests/util/mtree/t_mtree.sh:1.2 --- src/tests/util/mtree/t_mtree.sh:1.1 Tue Apr 7 13:52:08 2009 +++ src/tests/util/mtree/t_mtree.sh Tue Apr 7 19:28:40 2009 @@ -1,4 +1,4 @@ -# $NetBSD: t_mtree.sh,v 1.1 2009/04/07 13:52:08 apb Exp $ +# $NetBSD: t_mtree.sh,v 1.2 2009/04/07 19:28:40 apb Exp $ # # Copyright (c) 2009 The NetBSD Foundation, Inc. # All rights reserved. @@ -77,7 +77,7 @@ create_setup # run mtree and check output - ( cd create && mtree -c -k type,nlink,size,sha256 ) >output.raw \ + ( cd create && mtree -c -k type,nlink,link,size,sha256 ) >output.raw \ || atf_fail "mtree exit status $?" h_postprocess output h_check "$(atf_get_srcdir)/d_create.out" output @@ -99,8 +99,32 @@ h_check /dev/null output } +atf_test_case convert_C +convert_C_head() +{ + atf_set "descr" "Convert a specfile to mtree -C format" +} +convert_C_body() +{ + mtree -C -K all <"$(atf_get_srcdir)/d_convert.in" >output + h_check "$(atf_get_srcdir)/d_convert_C.out" output +} + +atf_test_case convert_D +convert_D_head() +{ + atf_set "descr" "Convert a specfile to mtree -D format" +} +convert_D_body() +{ + mtree -D -K all <"$(atf_get_srcdir)/d_convert.in" >output + h_check "$(atf_get_srcdir)/d_convert_D.out" output +} + atf_init_test_cases() { atf_add_test_case create atf_add_test_case check + atf_add_test_case convert_C + atf_add_test_case convert_D } Added files: Index: src/tests/util/mtree/d_convert.in diff -u /dev/null src/tests/util/mtree/d_convert.in:1.1 --- /dev/null Tue Apr 7 19:28:41 2009 +++ src/tests/util/mtree/d_convert.in Tue Apr 7 19:28:40 2009 @@ -0,0 +1,39 @@ +# Similar to d_create.out, but a few entries have been deleted; nlink, +# size and sha256 attributes have been removed; and the order has been +# changed to test sorting. + +#
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Tue Apr 7 18:42:30 UTC 2009 Modified Files: src/sys/dev/pci: if_wm.c Log Message: Reload sc_ctrl in wm_reset(). Add an ICH10 entry. Remove some obsolete comments. To generate a diff of this commit: cvs rdiff -u -r1.173 -r1.174 src/sys/dev/pci/if_wm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.173 src/sys/dev/pci/if_wm.c:1.174 --- src/sys/dev/pci/if_wm.c:1.173 Tue Apr 7 18:23:37 2009 +++ src/sys/dev/pci/if_wm.c Tue Apr 7 18:42:30 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.173 2009/04/07 18:23:37 msaitoh Exp $ */ +/* $NetBSD: if_wm.c,v 1.174 2009/04/07 18:42:30 msaitoh Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -73,13 +73,10 @@ * TODO (in order of importance): * * - Rework how parameters are loaded from the EEPROM. - * - Figure out what to do with the i82545GM and i82546GB - * SERDES controllers. - * - Fix hw VLAN assist. */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.173 2009/04/07 18:23:37 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.174 2009/04/07 18:42:30 msaitoh Exp $"); #include "bpfilter.h" #include "rnd.h" @@ -886,6 +883,9 @@ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82567LF_3, "82567LF-3 LAN Controller", WM_T_ICH10, WMP_F_1000T }, + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801J_D_BM_LF, + "i82801J (LF) LAN Controller", + WM_T_ICH10, WMP_F_1000T }, { 0, 0, NULL, 0, 0 }, @@ -3077,6 +3077,9 @@ wm_get_auto_rd_done(sc); } + /* reload sc_ctrl */ + sc->sc_ctrl = CSR_READ(sc, WMREG_CTRL); + #if 0 for (i = 0; i < 1000; i++) { if ((CSR_READ(sc, WMREG_CTRL) & CTRL_RST) == 0) {
CVS commit: src/sys/dev/pci
Module Name:src Committed By: dyoung Date: Tue Apr 7 18:25:26 UTC 2009 Modified Files: src/sys/dev/pci: ehci_pci.c uhci_pci.c Log Message: Detach ehci(4) and uhci(4) at shutdown. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/dev/pci/ehci_pci.c cvs rdiff -u -r1.44 -r1.45 src/sys/dev/pci/uhci_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/ehci_pci.c diff -u src/sys/dev/pci/ehci_pci.c:1.38 src/sys/dev/pci/ehci_pci.c:1.39 --- src/sys/dev/pci/ehci_pci.c:1.38 Mon Apr 28 20:23:54 2008 +++ src/sys/dev/pci/ehci_pci.c Tue Apr 7 18:25:26 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ehci_pci.c,v 1.38 2008/04/28 20:23:54 martin Exp $ */ +/* $NetBSD: ehci_pci.c,v 1.39 2009/04/07 18:25:26 dyoung Exp $ */ /* * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ehci_pci.c,v 1.38 2008/04/28 20:23:54 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ehci_pci.c,v 1.39 2009/04/07 18:25:26 dyoung Exp $"); #include #include @@ -243,9 +243,9 @@ return (0); } -CFATTACH_DECL2_NEW(ehci_pci, sizeof(struct ehci_pci_softc), +CFATTACH_DECL3_NEW(ehci_pci, sizeof(struct ehci_pci_softc), ehci_pci_match, ehci_pci_attach, ehci_pci_detach, ehci_activate, NULL, -ehci_childdet); +ehci_childdet, DVF_DETACH_SHUTDOWN); #ifdef EHCI_DEBUG static void Index: src/sys/dev/pci/uhci_pci.c diff -u src/sys/dev/pci/uhci_pci.c:1.44 src/sys/dev/pci/uhci_pci.c:1.45 --- src/sys/dev/pci/uhci_pci.c:1.44 Mon Apr 28 20:23:55 2008 +++ src/sys/dev/pci/uhci_pci.c Tue Apr 7 18:25:26 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: uhci_pci.c,v 1.44 2008/04/28 20:23:55 martin Exp $ */ +/* $NetBSD: uhci_pci.c,v 1.45 2009/04/07 18:25:26 dyoung Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uhci_pci.c,v 1.44 2008/04/28 20:23:55 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uhci_pci.c,v 1.45 2009/04/07 18:25:26 dyoung Exp $"); #include "ehci.h" @@ -234,6 +234,6 @@ return uhci_resume(dv PMF_FN_CALL); } -CFATTACH_DECL2_NEW(uhci_pci, sizeof(struct uhci_pci_softc), +CFATTACH_DECL3_NEW(uhci_pci, sizeof(struct uhci_pci_softc), uhci_pci_match, uhci_pci_attach, uhci_pci_detach, uhci_activate, -NULL, uhci_childdet); +NULL, uhci_childdet, DVF_DETACH_SHUTDOWN);
CVS commit: src/sys/dev/ic
Module Name:src Committed By: dyoung Date: Tue Apr 7 18:02:04 UTC 2009 Modified Files: src/sys/dev/ic: rtw.c Log Message: Cosmetic: remove some dead code. To generate a diff of this commit: cvs rdiff -u -r1.107 -r1.108 src/sys/dev/ic/rtw.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/rtw.c diff -u src/sys/dev/ic/rtw.c:1.107 src/sys/dev/ic/rtw.c:1.108 --- src/sys/dev/ic/rtw.c:1.107 Thu Apr 2 00:57:20 2009 +++ src/sys/dev/ic/rtw.c Tue Apr 7 18:02:04 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: rtw.c,v 1.107 2009/04/02 00:57:20 dyoung Exp $ */ +/* $NetBSD: rtw.c,v 1.108 2009/04/07 18:02:04 dyoung Exp $ */ /*- * Copyright (c) 2004, 2005, 2006, 2007 David Young. All rights * reserved. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rtw.c,v 1.107 2009/04/02 00:57:20 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rtw.c,v 1.108 2009/04/07 18:02:04 dyoung Exp $"); #include "bpfilter.h" @@ -1422,11 +1422,7 @@ /* XXX reference source does not enable MULRW */ /* enable PCI Read/Write Multiple */ -#if 1 cr |= RTW_CR_MULRW; -#else - cr &= ~RTW_CR_MULRW; -#endif /* The receive engine will always start at RDSAR. */ if (enable && (flags & ~cr & RTW_CR_RE)) {
CVS commit: src/sys/dev/scsipi
Module Name:src Committed By: dyoung Date: Tue Apr 7 18:35:17 UTC 2009 Modified Files: src/sys/dev/scsipi: atapiconf.c cd.c scsiconf.c sd.c Log Message: Detach atapibus(4), scsibus(4), cd(4), and sd(4) during shutdown. Destroy sd->sc_callout in sddetach(). Delete some dead code in cddetach(). To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/sys/dev/scsipi/atapiconf.c cvs rdiff -u -r1.291 -r1.292 src/sys/dev/scsipi/cd.c cvs rdiff -u -r1.250 -r1.251 src/sys/dev/scsipi/scsiconf.c cvs rdiff -u -r1.277 -r1.278 src/sys/dev/scsipi/sd.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/scsipi/atapiconf.c diff -u src/sys/dev/scsipi/atapiconf.c:1.77 src/sys/dev/scsipi/atapiconf.c:1.78 --- src/sys/dev/scsipi/atapiconf.c:1.77 Mon Mar 24 14:44:26 2008 +++ src/sys/dev/scsipi/atapiconf.c Tue Apr 7 18:35:17 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: atapiconf.c,v 1.77 2008/03/24 14:44:26 cube Exp $ */ +/* $NetBSD: atapiconf.c,v 1.78 2009/04/07 18:35:17 dyoung Exp $ */ /* * Copyright (c) 1996, 2001 Manuel Bouyer. All rights reserved. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: atapiconf.c,v 1.77 2008/03/24 14:44:26 cube Exp $"); +__KERNEL_RCSID(0, "$NetBSD: atapiconf.c,v 1.78 2009/04/07 18:35:17 dyoung Exp $"); #include #include @@ -68,9 +68,9 @@ static int atapibusprint(void *, const char *); -CFATTACH_DECL2_NEW(atapibus, sizeof(struct atapibus_softc), +CFATTACH_DECL3_NEW(atapibus, sizeof(struct atapibus_softc), atapibusmatch, atapibusattach, atapibusdetach, atapibusactivate, NULL, -atapibuschilddet); +atapibuschilddet, DVF_DETACH_SHUTDOWN); extern struct cfdriver atapibus_cd; Index: src/sys/dev/scsipi/cd.c diff -u src/sys/dev/scsipi/cd.c:1.291 src/sys/dev/scsipi/cd.c:1.292 --- src/sys/dev/scsipi/cd.c:1.291 Wed Apr 1 12:19:04 2009 +++ src/sys/dev/scsipi/cd.c Tue Apr 7 18:35:17 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: cd.c,v 1.291 2009/04/01 12:19:04 reinoud Exp $ */ +/* $NetBSD: cd.c,v 1.292 2009/04/07 18:35:17 dyoung Exp $ */ /*- * Copyright (c) 1998, 2001, 2003, 2004, 2005, 2008 The NetBSD Foundation, @@ -50,7 +50,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.291 2009/04/01 12:19:04 reinoud Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.292 2009/04/07 18:35:17 dyoung Exp $"); #include "rnd.h" @@ -181,8 +181,8 @@ static void cd_set_properties(struct cd_softc *); -CFATTACH_DECL_NEW(cd, sizeof(struct cd_softc), cdmatch, cdattach, cddetach, -cdactivate); +CFATTACH_DECL3_NEW(cd, sizeof(struct cd_softc), cdmatch, cdattach, cddetach, +cdactivate, NULL, NULL, DVF_DETACH_SHUTDOWN); extern struct cfdriver cd_cd; @@ -354,12 +354,6 @@ disk_detach(&cd->sc_dk); disk_destroy(&cd->sc_dk); -#if 0 - /* Get rid of the shutdown hook. */ - if (cd->sc_sdhook != NULL) - shutdownhook_disestablish(cd->sc_sdhook); -#endif - #if NRND > 0 /* Unhook the entropy source. */ rnd_detach_source(&cd->rnd_source); Index: src/sys/dev/scsipi/scsiconf.c diff -u src/sys/dev/scsipi/scsiconf.c:1.250 src/sys/dev/scsipi/scsiconf.c:1.251 --- src/sys/dev/scsipi/scsiconf.c:1.250 Wed Jul 16 18:50:58 2008 +++ src/sys/dev/scsipi/scsiconf.c Tue Apr 7 18:35:17 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: scsiconf.c,v 1.250 2008/07/16 18:50:58 drochner Exp $ */ +/* $NetBSD: scsiconf.c,v 1.251 2009/04/07 18:35:17 dyoung Exp $ */ /*- * Copyright (c) 1998, 1999, 2004 The NetBSD Foundation, Inc. @@ -48,7 +48,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.250 2008/07/16 18:50:58 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.251 2009/04/07 18:35:17 dyoung Exp $"); #include #include @@ -94,9 +94,9 @@ static int scsibusrescan(struct device *, const char *, const int *); static void scsidevdetached(struct device *, struct device *); -CFATTACH_DECL2_NEW(scsibus, sizeof(struct scsibus_softc), +CFATTACH_DECL3_NEW(scsibus, sizeof(struct scsibus_softc), scsibusmatch, scsibusattach, scsibusdetach, scsibusactivate, -scsibusrescan, scsidevdetached); +scsibusrescan, scsidevdetached, DVF_DETACH_SHUTDOWN); extern struct cfdriver scsibus_cd; Index: src/sys/dev/scsipi/sd.c diff -u src/sys/dev/scsipi/sd.c:1.277 src/sys/dev/scsipi/sd.c:1.278 --- src/sys/dev/scsipi/sd.c:1.277 Tue Jan 13 13:35:54 2009 +++ src/sys/dev/scsipi/sd.c Tue Apr 7 18:35:17 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: sd.c,v 1.277 2009/01/13 13:35:54 yamt Exp $ */ +/* $NetBSD: sd.c,v 1.278 2009/04/07 18:35:17 dyoung Exp $ */ /*- * Copyright (c) 1998, 2003, 2004 The NetBSD Foundation, Inc. @@ -47,7 +47,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.277 2009/01/13 13:35:54 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.278 2009/04/07 18:35:17 dyoung Exp $"); #include "opt_scsi.h" #include "rnd.h" @@ -129,8 +129,8 @@ static int sddetach(struct device *, int); static void sd_set_properties(struct sd_softc *)
CVS commit: src/sys/dev/mii
Module Name:src Committed By: dyoung Date: Tue Apr 7 18:05:02 UTC 2009 Modified Files: src/sys/dev/mii: mii_physubr.c Log Message: In mii_phy_detach(), destroy the NWay callout. To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.63 src/sys/dev/mii/mii_physubr.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/mii/mii_physubr.c diff -u src/sys/dev/mii/mii_physubr.c:1.62 src/sys/dev/mii/mii_physubr.c:1.63 --- src/sys/dev/mii/mii_physubr.c:1.62 Fri Jan 16 20:51:18 2009 +++ src/sys/dev/mii/mii_physubr.c Tue Apr 7 18:05:02 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: mii_physubr.c,v 1.62 2009/01/16 20:51:18 cegger Exp $ */ +/* $NetBSD: mii_physubr.c,v 1.63 2009/04/07 18:05:02 dyoung Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mii_physubr.c,v 1.62 2009/01/16 20:51:18 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mii_physubr.c,v 1.63 2009/04/07 18:05:02 dyoung Exp $"); #include #include @@ -560,6 +560,8 @@ if (sc->mii_flags & MIIF_DOINGAUTO) callout_stop(&sc->mii_nway_ch); + callout_destroy(&sc->mii_nway_ch); + mii_phy_delete_media(sc); LIST_REMOVE(sc, mii_list);
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Tue Apr 7 18:40:39 UTC 2009 Modified Files: src/sys/dev/pci: pcidevs Log Message: add 82801J_D_BM_LF (ICH10) To generate a diff of this commit: cvs rdiff -u -r1.981 -r1.982 src/sys/dev/pci/pcidevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/pcidevs diff -u src/sys/dev/pci/pcidevs:1.981 src/sys/dev/pci/pcidevs:1.982 --- src/sys/dev/pci/pcidevs:1.981 Tue Mar 10 03:30:55 2009 +++ src/sys/dev/pci/pcidevs Tue Apr 7 18:40:39 2009 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.981 2009/03/10 03:30:55 msaitoh Exp $ +$NetBSD: pcidevs,v 1.982 2009/04/07 18:40:39 msaitoh Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -2244,6 +2244,7 @@ product INTEL 82801H_IFE_GT 0x10c4 i82801H IFE (GT) LAN Controller product INTEL 82801H_IFE_G 0x10c5 i82801H IFE (G) LAN Controller product INTEL 82801H_IGP_M_V 0x10cb i82801H IGP (MV) LAN Controller +product INTEL 82801J_D_BM_LF 0x10cd i82801J (LF) LAN Controller product INTEL 82567V 0x10ce i82567V LAN Controller product INTEL 82574L 0x10d3 i82574L 1000baseT Ethernet product INTEL 82567LM_3 0x10de i82567LM-3 LAN Controller
CVS commit: src/sys/rump/librump/rumpvfs
Module Name:src Committed By: pooka Date: Tue Apr 7 18:34:18 UTC 2009 Modified Files: src/sys/rump/librump/rumpvfs: rumpblk.c Log Message: Fix typo that slipped in a while ago. Fixes non-file mounts. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/rump/librump/rumpvfs/rumpblk.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/rump/librump/rumpvfs/rumpblk.c diff -u src/sys/rump/librump/rumpvfs/rumpblk.c:1.16 src/sys/rump/librump/rumpvfs/rumpblk.c:1.17 --- src/sys/rump/librump/rumpvfs/rumpblk.c:1.16 Mon Apr 6 20:40:33 2009 +++ src/sys/rump/librump/rumpvfs/rumpblk.c Tue Apr 7 18:34:18 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpblk.c,v 1.16 2009/04/06 20:40:33 pooka Exp $ */ +/* $NetBSD: rumpblk.c,v 1.17 2009/04/07 18:34:18 pooka Exp $ */ /* * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -43,7 +43,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rumpblk.c,v 1.16 2009/04/06 20:40:33 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rumpblk.c,v 1.17 2009/04/07 18:34:18 pooka Exp $"); #include #include @@ -355,7 +355,8 @@ rblk->rblk_curpi = &rblk->rblk_pi; } else { if (rumpuser_ioctl(fd, DIOCGDINFO, &rblk->rblk_dl, - &error) != -1) { + &error) == -1) { + KASSERT(error); rumpuser_close(fd, &dummy); return error; }
CVS commit: src/sys/dev/isa
Module Name:src Committed By: dyoung Date: Tue Apr 7 18:31:12 UTC 2009 Modified Files: src/sys/dev/isa: midi_pcppi.c Log Message: Detach midi at pcppi during shutdown. Sprinkle static. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/dev/isa/midi_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/midi_pcppi.c diff -u src/sys/dev/isa/midi_pcppi.c:1.20 src/sys/dev/isa/midi_pcppi.c:1.21 --- src/sys/dev/isa/midi_pcppi.c:1.20 Sat Mar 14 15:36:18 2009 +++ src/sys/dev/isa/midi_pcppi.c Tue Apr 7 18:31:12 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: midi_pcppi.c,v 1.20 2009/03/14 15:36:18 dsl Exp $ */ +/* $NetBSD: midi_pcppi.c,v 1.21 2009/04/07 18:31:12 dyoung Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: midi_pcppi.c,v 1.20 2009/03/14 15:36:18 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: midi_pcppi.c,v 1.21 2009/04/07 18:31:12 dyoung Exp $"); #include #include @@ -60,16 +60,17 @@ midisyn sc_midisyn; }; -int midi_pcppi_match(device_t, cfdata_t , void *); -void midi_pcppi_attach(device_t, device_t, void *); +static int midi_pcppi_match(device_t, cfdata_t , void *); +static void midi_pcppi_attach(device_t, device_t, void *); void midi_pcppi_on (midisyn *, uint_fast16_t, midipitch_t, int16_t); void midi_pcppi_off (midisyn *, uint_fast16_t, uint_fast8_t); void midi_pcppi_close(midisyn *); static void midi_pcppi_repitchv(midisyn *, uint_fast16_t, midipitch_t); -CFATTACH_DECL_NEW(midi_pcppi, sizeof(struct midi_pcppi_softc), -midi_pcppi_match, midi_pcppi_attach, NULL, NULL); +CFATTACH_DECL3_NEW(midi_pcppi, sizeof(struct midi_pcppi_softc), +midi_pcppi_match, midi_pcppi_attach, mididetach, NULL, NULL, NULL, +DVF_DETACH_SHUTDOWN); struct midisyn_methods midi_pcppi_hw = { .close= midi_pcppi_close, @@ -80,13 +81,13 @@ int midi_pcppi_attached = 0; /* Not very nice */ -int +static int midi_pcppi_match(device_t parent, cfdata_t match, void *aux) { return (!midi_pcppi_attached); } -void +static void midi_pcppi_attach(device_t parent, device_t self, void *aux) { struct midi_pcppi_softc *sc = device_private(self);
CVS commit: src/usr.sbin/mtree
Module Name:src Committed By: apb Date: Tue Apr 7 18:06:41 UTC 2009 Modified Files: src/usr.sbin/mtree: spec.c Log Message: fix another missing "prev" link To generate a diff of this commit: cvs rdiff -u -r1.72 -r1.73 src/usr.sbin/mtree/spec.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/mtree/spec.c diff -u src/usr.sbin/mtree/spec.c:1.72 src/usr.sbin/mtree/spec.c:1.73 --- src/usr.sbin/mtree/spec.c:1.72 Sun Apr 5 15:47:03 2009 +++ src/usr.sbin/mtree/spec.c Tue Apr 7 18:06:41 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: spec.c,v 1.72 2009/04/05 15:47:03 apb Exp $ */ +/* $NetBSD: spec.c,v 1.73 2009/04/07 18:06:41 apb Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -67,7 +67,7 @@ #if 0 static char sccsid[] = "@(#)spec.c 8.2 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: spec.c,v 1.72 2009/04/05 15:47:03 apb Exp $"); +__RCSID("$NetBSD: spec.c,v 1.73 2009/04/07 18:06:41 apb Exp $"); #endif #endif /* not lint */ @@ -708,6 +708,7 @@ if (insertpos) { centry->next = insertpos->next; insertpos->next = centry; +centry->prev = insertpos; if (centry->next) centry->next->prev = centry; } else {
CVS commit: src/sys/dev/pci
Module Name:src Committed By: dyoung Date: Tue Apr 7 18:07:10 UTC 2009 Modified Files: src/sys/dev/pci: if_bnx.c Log Message: Destroy sc->bnx_timeout in bnx_detach(). To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/dev/pci/if_bnx.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_bnx.c diff -u src/sys/dev/pci/if_bnx.c:1.24 src/sys/dev/pci/if_bnx.c:1.25 --- src/sys/dev/pci/if_bnx.c:1.24 Fri Apr 3 00:14:42 2009 +++ src/sys/dev/pci/if_bnx.c Tue Apr 7 18:07:10 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: if_bnx.c,v 1.24 2009/04/03 00:14:42 dyoung Exp $ */ +/* $NetBSD: if_bnx.c,v 1.25 2009/04/07 18:07:10 dyoung Exp $ */ /* $OpenBSD: if_bnx.c,v 1.43 2007/01/30 03:21:10 krw Exp $ */ /*- @@ -35,7 +35,7 @@ #if 0 __FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.3 2006/04/13 14:12:26 ru Exp $"); #endif -__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.24 2009/04/03 00:14:42 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.25 2009/04/07 18:07:10 dyoung Exp $"); /* * The following controllers are supported by this driver: @@ -738,6 +738,7 @@ splx(s); pmf_device_deregister(dev); + callout_destroy(&sc->bnx_timeout); ether_ifdetach(ifp); if_detach(ifp); mii_detach(&sc->bnx_mii, MII_PHY_ANY, MII_OFFSET_ANY);
CVS commit: src/sys/dev/usb
Module Name:src Committed By: dyoung Date: Tue Apr 7 18:15:45 UTC 2009 Modified Files: src/sys/dev/usb: uhub.c usb.c Log Message: Detach uhub(4) and usb(4) at shutdown. To generate a diff of this commit: cvs rdiff -u -r1.103 -r1.104 src/sys/dev/usb/uhub.c cvs rdiff -u -r1.115 -r1.116 src/sys/dev/usb/usb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/uhub.c diff -u src/sys/dev/usb/uhub.c:1.103 src/sys/dev/usb/uhub.c:1.104 --- src/sys/dev/usb/uhub.c:1.103 Mon Aug 18 18:03:21 2008 +++ src/sys/dev/usb/uhub.c Tue Apr 7 18:15:45 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: uhub.c,v 1.103 2008/08/18 18:03:21 kent Exp $ */ +/* $NetBSD: uhub.c,v 1.104 2009/04/07 18:15:45 dyoung Exp $ */ /* $FreeBSD: src/sys/dev/usb/uhub.c,v 1.18 1999/11/17 22:33:43 n_hibma Exp $ */ /* @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.103 2008/08/18 18:03:21 kent Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.104 2009/04/07 18:15:45 dyoung Exp $"); #include #include @@ -100,8 +100,9 @@ int uhub_detach(device_t, int); int uhub_activate(device_t, enum devact); extern struct cfdriver uhub_cd; -CFATTACH_DECL2_NEW(uhub, sizeof(struct uhub_softc), uhub_match, -uhub_attach, uhub_detach, uhub_activate, uhub_rescan, uhub_childdet); +CFATTACH_DECL3_NEW(uhub, sizeof(struct uhub_softc), uhub_match, +uhub_attach, uhub_detach, uhub_activate, uhub_rescan, uhub_childdet, +DVF_DETACH_SHUTDOWN); CFATTACH_DECL2_NEW(uroothub, sizeof(struct uhub_softc), uhub_match, uhub_attach, uhub_detach, uhub_activate, uhub_rescan, uhub_childdet); Index: src/sys/dev/usb/usb.c diff -u src/sys/dev/usb/usb.c:1.115 src/sys/dev/usb/usb.c:1.116 --- src/sys/dev/usb/usb.c:1.115 Mon May 26 18:00:33 2008 +++ src/sys/dev/usb/usb.c Tue Apr 7 18:15:45 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: usb.c,v 1.115 2008/05/26 18:00:33 drochner Exp $ */ +/* $NetBSD: usb.c,v 1.116 2009/04/07 18:15:45 dyoung Exp $ */ /* * Copyright (c) 1998, 2002, 2008 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.115 2008/05/26 18:00:33 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.116 2009/04/07 18:15:45 dyoung Exp $"); #include "opt_compat_netbsd.h" @@ -162,8 +162,9 @@ extern struct cfdriver usb_cd; -CFATTACH_DECL2_NEW(usb, sizeof(struct usb_softc), -usb_match, usb_attach, usb_detach, usb_activate, NULL, usb_childdet); +CFATTACH_DECL3_NEW(usb, sizeof(struct usb_softc), +usb_match, usb_attach, usb_detach, usb_activate, NULL, usb_childdet, +DVF_DETACH_SHUTDOWN); USB_MATCH(usb) {
CVS commit: src/sys/kern
Module Name:src Committed By: dyoung Date: Tue Apr 7 18:16:28 UTC 2009 Modified Files: src/sys/kern: kern_pmf.c Log Message: Cosmetic: join lines. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/kern/kern_pmf.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_pmf.c diff -u src/sys/kern/kern_pmf.c:1.23 src/sys/kern/kern_pmf.c:1.24 --- src/sys/kern/kern_pmf.c:1.23 Thu Apr 2 22:19:48 2009 +++ src/sys/kern/kern_pmf.c Tue Apr 7 18:16:28 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_pmf.c,v 1.23 2009/04/02 22:19:48 dyoung Exp $ */ +/* $NetBSD: kern_pmf.c,v 1.24 2009/04/07 18:16:28 dyoung Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_pmf.c,v 1.23 2009/04/02 22:19:48 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_pmf.c,v 1.24 2009/04/07 18:16:28 dyoung Exp $"); #include #include @@ -302,8 +302,7 @@ for (curdev = shutdown_first(&s); curdev != NULL; curdev = shutdown_next(&s)) { - aprint_debug(" attempting %s shutdown", - device_xname(curdev)); + aprint_debug(" attempting %s shutdown", device_xname(curdev)); if ((boothowto & RB_NOSYNC) == 0 && config_detach(curdev, DETACH_SHUTDOWN) == 0) aprint_debug("(detached)");
CVS commit: src/sys/dev/mii
Module Name:src Committed By: dyoung Date: Tue Apr 7 18:05:55 UTC 2009 Modified Files: src/sys/dev/mii: brgphy.c Log Message: Detach brgphy(4) at shutdown. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/dev/mii/brgphy.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/mii/brgphy.c diff -u src/sys/dev/mii/brgphy.c:1.41 src/sys/dev/mii/brgphy.c:1.42 --- src/sys/dev/mii/brgphy.c:1.41 Mon Nov 17 03:04:27 2008 +++ src/sys/dev/mii/brgphy.c Tue Apr 7 18:05:54 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: brgphy.c,v 1.41 2008/11/17 03:04:27 dyoung Exp $ */ +/* $NetBSD: brgphy.c,v 1.42 2009/04/07 18:05:54 dyoung Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.41 2008/11/17 03:04:27 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.42 2009/04/07 18:05:54 dyoung Exp $"); #include #include @@ -88,8 +88,9 @@ static int brgphymatch(device_t, cfdata_t, void *); static void brgphyattach(device_t, device_t, void *); -CFATTACH_DECL_NEW(brgphy, sizeof(struct mii_softc), -brgphymatch, brgphyattach, mii_phy_detach, mii_phy_activate); +CFATTACH_DECL3_NEW(brgphy, sizeof(struct mii_softc), +brgphymatch, brgphyattach, mii_phy_detach, mii_phy_activate, NULL, NULL, +DVF_DETACH_SHUTDOWN); static int brgphy_service(struct mii_softc *, struct mii_data *, int); static void brgphy_status(struct mii_softc *);
CVS commit: src/sys/arch
Module Name:src Committed By: dyoung Date: Tue Apr 7 18:24:23 UTC 2009 Modified Files: src/sys/arch/i386/i386: autoconf.c src/sys/arch/x86/conf: files.x86 src/sys/arch/x86/x86: intr.c Log Message: Add opt_intrdebug.h for the INTRDEBUG option, and #include it here and there. Fixes GENERIC/i386 compilation with 'options INTRDEBUG'. To generate a diff of this commit: cvs rdiff -u -r1.93 -r1.94 src/sys/arch/i386/i386/autoconf.c cvs rdiff -u -r1.48 -r1.49 src/sys/arch/x86/conf/files.x86 cvs rdiff -u -r1.59 -r1.60 src/sys/arch/x86/x86/intr.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/i386/i386/autoconf.c diff -u src/sys/arch/i386/i386/autoconf.c:1.93 src/sys/arch/i386/i386/autoconf.c:1.94 --- src/sys/arch/i386/i386/autoconf.c:1.93 Tue Nov 11 14:40:18 2008 +++ src/sys/arch/i386/i386/autoconf.c Tue Apr 7 18:24:23 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.93 2008/11/11 14:40:18 ad Exp $ */ +/* $NetBSD: autoconf.c,v 1.94 2009/04/07 18:24:23 dyoung Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -46,9 +46,10 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.93 2008/11/11 14:40:18 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.94 2009/04/07 18:24:23 dyoung Exp $"); #include "opt_compat_oldboot.h" +#include "opt_intrdebug.h" #include "opt_multiprocessor.h" #include @@ -60,6 +61,7 @@ #include #include #include +#include #include #include Index: src/sys/arch/x86/conf/files.x86 diff -u src/sys/arch/x86/conf/files.x86:1.48 src/sys/arch/x86/conf/files.x86:1.49 --- src/sys/arch/x86/conf/files.x86:1.48 Mon Mar 30 22:20:55 2009 +++ src/sys/arch/x86/conf/files.x86 Tue Apr 7 18:24:23 2009 @@ -1,4 +1,4 @@ -# $NetBSD: files.x86,v 1.48 2009/03/30 22:20:55 rmind Exp $ +# $NetBSD: files.x86,v 1.49 2009/04/07 18:24:23 dyoung Exp $ # options for MP configuration through the MP spec defflag opt_mpbios.h MPBIOS MPVERBOSE MPDEBUG MPBIOS_SCANPCI @@ -6,6 +6,9 @@ # MTRR support defflag MTRR +# Interrupt debug +defflag opt_intrdebug.h INTRDEBUG + # PCI fixup options defflag opt_pcifixup.h PCI_ADDR_FIXUP PCI_BUS_FIXUP PCI_INTR_FIXUP PCI_INTR_FIXUP_FORCE Index: src/sys/arch/x86/x86/intr.c diff -u src/sys/arch/x86/x86/intr.c:1.59 src/sys/arch/x86/x86/intr.c:1.60 --- src/sys/arch/x86/x86/intr.c:1.59 Tue Feb 24 06:03:55 2009 +++ src/sys/arch/x86/x86/intr.c Tue Apr 7 18:24:23 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.59 2009/02/24 06:03:55 yamt Exp $ */ +/* $NetBSD: intr.c,v 1.60 2009/04/07 18:24:23 dyoung Exp $ */ /*- * Copyright (c) 2007, 2008 The NetBSD Foundation, Inc. @@ -133,8 +133,9 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.59 2009/02/24 06:03:55 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.60 2009/04/07 18:24:23 dyoung Exp $"); +#include "opt_intrdebug.h" #include "opt_multiprocessor.h" #include "opt_acpi.h"
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Tue Apr 7 18:23:37 UTC 2009 Modified Files: src/sys/dev/pci: if_wm.c if_wmreg.h Log Message: Fix about TBI mode. This fix doesn't influence MII mode. - Fix SWDPIN(1)'s polarity on some chips. - Fix flow control stuff (includes PR#32009). - Stop RXCFG storm. It ocours easily. - And more fix about autonego. Tested on PRO/1000T, PRO/1000XF and PRO/1000 MF. To generate a diff of this commit: cvs rdiff -u -r1.172 -r1.173 src/sys/dev/pci/if_wm.c cvs rdiff -u -r1.26 -r1.27 src/sys/dev/pci/if_wmreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.172 src/sys/dev/pci/if_wm.c:1.173 --- src/sys/dev/pci/if_wm.c:1.172 Tue Mar 31 06:58:55 2009 +++ src/sys/dev/pci/if_wm.c Tue Apr 7 18:23:37 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.172 2009/03/31 06:58:55 darran Exp $ */ +/* $NetBSD: if_wm.c,v 1.173 2009/04/07 18:23:37 msaitoh Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -79,7 +79,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.172 2009/03/31 06:58:55 darran Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.173 2009/04/07 18:23:37 msaitoh Exp $"); #include "bpfilter.h" #include "rnd.h" @@ -257,6 +257,8 @@ WM_T_ICH10, /* ICH10 LAN */ } wm_chip_type; +#define WM_LINKUP_TIMEOUT 50 + /* * Software state per device. */ @@ -377,7 +379,10 @@ uint32_t sc_pba; /* prototype PBA register */ int sc_tbi_linkup; /* TBI link status */ - int sc_tbi_anstate; /* autonegotiation state */ + int sc_tbi_anegticks; /* autonegotiation ticks */ + int sc_tbi_ticks; /* tbi ticks */ + int sc_tbi_nrxcfg; /* count of ICR_RXCFG */ + int sc_tbi_lastnrxcfg; /* count of ICR_RXCFG (on last tick) */ int sc_mchash_type; /* multicast filter offset */ @@ -594,6 +599,7 @@ #endif static int wm_check_mng_mode_generic(struct wm_softc *); static void wm_get_hw_control(struct wm_softc *); +static int wm_check_for_link(struct wm_softc *); CFATTACH_DECL_NEW(wm, sizeof(struct wm_softc), wm_match, wm_attach, NULL, NULL); @@ -2780,6 +2786,8 @@ { uint32_t status; + DPRINTF(WM_DEBUG_LINK, ("%s: %s:\n", device_xname(sc->sc_dev), + __func__)); /* * If we get a link status interrupt on a 1000BASE-T * device, just fall into the normal MII tick path. @@ -2836,22 +2844,18 @@ return; } - /* - * If we are now receiving /C/, check for link again in - * a couple of link clock ticks. - */ - if (icr & ICR_RXCFG) { - DPRINTF(WM_DEBUG_LINK, ("%s: LINK: receiving /C/\n", - device_xname(sc->sc_dev))); - sc->sc_tbi_anstate = 2; - } - + status = CSR_READ(sc, WMREG_STATUS); if (icr & ICR_LSC) { - status = CSR_READ(sc, WMREG_STATUS); if (status & STATUS_LU) { DPRINTF(WM_DEBUG_LINK, ("%s: LINK: LSC -> up %s\n", device_xname(sc->sc_dev), (status & STATUS_FD) ? "FDX" : "HDX")); + /* + * NOTE: CTRL will update TFCE and RFCE automatically, + * so we should update sc->sc_ctrl + */ + + sc->sc_ctrl = CSR_READ(sc, WMREG_CTRL); sc->sc_tctl &= ~TCTL_COLD(0x3ff); sc->sc_fcrtl &= ~FCRTL_XONE; if (status & STATUS_FD) @@ -2860,7 +2864,7 @@ else sc->sc_tctl |= TCTL_COLD(TX_COLLISION_DISTANCE_HDX); - if (CSR_READ(sc, WMREG_CTRL) & CTRL_TFCE) + if (sc->sc_ctrl & CTRL_TFCE) sc->sc_fcrtl |= FCRTL_XONE; CSR_WRITE(sc, WMREG_TCTL, sc->sc_tctl); CSR_WRITE(sc, (sc->sc_type < WM_T_82543) ? @@ -2872,8 +2876,12 @@ device_xname(sc->sc_dev))); sc->sc_tbi_linkup = 0; } - sc->sc_tbi_anstate = 2; wm_tbi_set_linkled(sc); + } else if (icr & ICR_RXCFG) { + DPRINTF(WM_DEBUG_LINK, ("%s: LINK: receiving /C/\n", + device_xname(sc->sc_dev))); + sc->sc_tbi_nrxcfg++; + wm_check_for_link(sc); } else if (icr & ICR_RXSEQ) { DPRINTF(WM_DEBUG_LINK, ("%s: LINK: Receive sequence error\n", @@ -3305,6 +3313,9 @@ reg |= RXCSUM_IPV6OFL | RXCSUM_TUOFL; CSR_WRITE(sc, WMREG_RXCSUM, reg); + /* Reset TBI's RXCFG count */ + sc->sc_tbi_nrxcfg = sc->sc_tbi_lastnrxcfg = 0; + /* * Set up the interrupt registers. */ @@ -3461,6 +3472,11 @@ if (sc->sc_flags & WM_F_HAS_MII) { /* Down the MII. */ mii_down(&sc->sc_mii); + } else { +#if 0 + /* Should we clear PHY's status properly? */ + wm_reset(sc); +#endif } /* Stop the transmit and receive processes. */ @@ -4095,6 +4111,7 @@ static void wm_tbi_mediainit(struct wm_softc *sc) { + struct ifnet *ifp = &sc->sc_ethercom.ec_if; const char *sep = ""; if (sc->sc_type < WM_T_82543) @@ -4102,6 +4119,12 @@ else sc->sc_tipg = TIPG_LG_DFLT; + sc->sc_tbi_anegticks = 5; + + /* Initialize our media structures */ + sc->sc_mii.mii_ifp = ifp; + + sc->sc_ethercom.ec_mii = &sc->sc_mii; ifmedia_init(&sc->sc_mii.mii_media, IFM_IMASK, wm_tbi_mediachange, wm_tbi_mediastatus); @@ -4143,12 +4166,13 @@
CVS commit: src/sys/dev/ata
Module Name:src Committed By: dyoung Date: Tue Apr 7 18:01:20 UTC 2009 Modified Files: src/sys/dev/ata: ata.c Log Message: Cosmetic: flag a potential problem in ata_channel_attach(): it initializes a callout that does not appear to be destroyed anywhere. Every callout_init() should ordinarily be matched by a callout_destroy(). To generate a diff of this commit: cvs rdiff -u -r1.104 -r1.105 src/sys/dev/ata/ata.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/ata/ata.c diff -u src/sys/dev/ata/ata.c:1.104 src/sys/dev/ata/ata.c:1.105 --- src/sys/dev/ata/ata.c:1.104 Fri Apr 3 21:31:08 2009 +++ src/sys/dev/ata/ata.c Tue Apr 7 18:01:20 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ata.c,v 1.104 2009/04/03 21:31:08 dyoung Exp $ */ +/* $NetBSD: ata.c,v 1.105 2009/04/07 18:01:20 dyoung Exp $ */ /* * Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.104 2009/04/03 21:31:08 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.105 2009/04/07 18:01:20 dyoung Exp $"); #include "opt_ata.h" @@ -162,6 +162,7 @@ if (chp->ch_flags & ATACH_DISABLED) return; + /* XXX callout_destroy */ callout_init(&chp->ch_callout, 0); TAILQ_INIT(&chp->ch_queue->queue_xfer);
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: dyoung Date: Tue Apr 7 17:59:18 UTC 2009 Modified Files: src/sys/dev/acpi: attimer_acpi.c Log Message: During shutdown, detach attimer at acpi. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/dev/acpi/attimer_acpi.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/acpi/attimer_acpi.c diff -u src/sys/dev/acpi/attimer_acpi.c:1.12 src/sys/dev/acpi/attimer_acpi.c:1.13 --- src/sys/dev/acpi/attimer_acpi.c:1.12 Tue Feb 17 12:46:01 2009 +++ src/sys/dev/acpi/attimer_acpi.c Tue Apr 7 17:59:18 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: attimer_acpi.c,v 1.12 2009/02/17 12:46:01 jmcneill Exp $ */ +/* $NetBSD: attimer_acpi.c,v 1.13 2009/04/07 17:59:18 dyoung Exp $ */ /* * Copyright (c) 2005 The NetBSD Foundation, Inc. @@ -59,7 +59,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: attimer_acpi.c,v 1.12 2009/02/17 12:46:01 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: attimer_acpi.c,v 1.13 2009/04/07 17:59:18 dyoung Exp $"); #include #include @@ -79,8 +79,9 @@ static int attimer_acpi_match(device_t, cfdata_t, void *); static void attimer_acpi_attach(device_t, device_t, void *); -CFATTACH_DECL_NEW(attimer_acpi, sizeof(struct attimer_softc), -attimer_acpi_match, attimer_acpi_attach, attimer_detach, NULL); +CFATTACH_DECL3_NEW(attimer_acpi, sizeof(struct attimer_softc), +attimer_acpi_match, attimer_acpi_attach, attimer_detach, NULL, NULL, NULL, +DVF_DETACH_SHUTDOWN); /* * Supported device IDs
CVS commit: src/sys/dev
Module Name:src Committed By: dyoung Date: Tue Apr 7 17:55:55 UTC 2009 Modified Files: src/sys/dev: midi_if.h Log Message: Declare mididetach() for use by midi0 at pcppi0. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/dev/midi_if.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/midi_if.h diff -u src/sys/dev/midi_if.h:1.21 src/sys/dev/midi_if.h:1.22 --- src/sys/dev/midi_if.h:1.21 Mon Apr 28 20:23:47 2008 +++ src/sys/dev/midi_if.h Tue Apr 7 17:55:55 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: midi_if.h,v 1.21 2008/04/28 20:23:47 martin Exp $ */ +/* $NetBSD: midi_if.h,v 1.22 2009/04/07 17:55:55 dyoung Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -84,6 +84,7 @@ void midi_register_hw_if_ext(struct midi_hw_if_ext *); void midi_attach(struct midi_softc *, device_t); +int mididetach(device_t, int); device_t midi_attach_mi(const struct midi_hw_if *, void *, device_t); int midi_unit_count(void);
CVS commit: src/sys/dev
Module Name:src Committed By: dyoung Date: Tue Apr 7 17:54:58 UTC 2009 Modified Files: src/sys/dev: midi.c Log Message: Cosmetic: in a debug statement, use "%s", __func__ instead of a misspelling of the detach routine's name. To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.69 src/sys/dev/midi.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/midi.c diff -u src/sys/dev/midi.c:1.68 src/sys/dev/midi.c:1.69 --- src/sys/dev/midi.c:1.68 Thu Jun 12 22:29:41 2008 +++ src/sys/dev/midi.c Tue Apr 7 17:54:58 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: midi.c,v 1.68 2008/06/12 22:29:41 cegger Exp $ */ +/* $NetBSD: midi.c,v 1.69 2009/04/07 17:54:58 dyoung Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: midi.c,v 1.68 2008/06/12 22:29:41 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: midi.c,v 1.69 2009/04/07 17:54:58 dyoung Exp $"); #include "midi.h" #include "sequencer.h" @@ -191,7 +191,7 @@ struct midi_softc *sc = device_private(self); int maj, mn; - DPRINTFN(2,("midi_detach: sc=%p flags=%d\n", sc, flags)); + DPRINTFN(2,("%s: sc=%p flags=%d\n", __func__, sc, flags)); pmf_device_deregister(self);
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: dyoung Date: Tue Apr 7 17:53:46 UTC 2009 Modified Files: src/sys/arch/x86/x86: ipmi.c Log Message: Add a device-detachment hook for ipmi(4). To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/arch/x86/x86/ipmi.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/ipmi.c diff -u src/sys/arch/x86/x86/ipmi.c:1.29 src/sys/arch/x86/x86/ipmi.c:1.30 --- src/sys/arch/x86/x86/ipmi.c:1.29 Sun Feb 22 07:14:46 2009 +++ src/sys/arch/x86/x86/ipmi.c Tue Apr 7 17:53:45 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ipmi.c,v 1.29 2009/02/22 07:14:46 dholland Exp $ */ +/* $NetBSD: ipmi.c,v 1.30 2009/04/07 17:53:45 dyoung Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -57,7 +57,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ipmi.c,v 1.29 2009/02/22 07:14:46 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipmi.c,v 1.30 2009/04/07 17:53:45 dyoung Exp $"); #include #include @@ -187,6 +187,7 @@ int ipmi_intr(void *); int ipmi_match(device_t, cfdata_t, void *); void ipmi_attach(device_t, device_t, void *); +static int ipmi_detach(device_t, int); long ipow(long, int); long ipmi_convert(uint8_t, struct sdrtype1 *, long); @@ -209,7 +210,7 @@ void ipmi_smbios_probe(struct smbios_ipmi *, struct ipmi_attach_args *); void ipmi_refresh_sensors(struct ipmi_softc *sc); int ipmi_map_regs(struct ipmi_softc *sc, struct ipmi_attach_args *ia); -void ipmi_unmap_regs(struct ipmi_softc *sc, struct ipmi_attach_args *ia); +void ipmi_unmap_regs(struct ipmi_softc *sc); void *scan_sig(long, long, int, int, const void *); @@ -869,7 +870,7 @@ CFATTACH_DECL2_NEW(ipmi, sizeof(struct ipmi_softc), -ipmi_match, ipmi_attach, NULL, NULL, NULL, NULL); +ipmi_match, ipmi_attach, ipmi_detach, NULL, NULL, NULL); /* Scan memory for signature */ void * @@ -1655,7 +1656,7 @@ } void -ipmi_unmap_regs(struct ipmi_softc *sc, struct ipmi_attach_args *ia) +ipmi_unmap_regs(struct ipmi_softc *sc) { bus_space_unmap(sc->sc_iot, sc->sc_ioh, sc->sc_if->nregs * sc->sc_if_iospacing); @@ -1731,7 +1732,7 @@ dbg_dump(1, "bmc data", len, cmd); rv = 1; /* GETID worked, we got IPMI */ unmap: - ipmi_unmap_regs(&sc, ia); + ipmi_unmap_regs(&sc); return rv; } @@ -1855,6 +1856,51 @@ config_interrupts(self, ipmi_attach2); } +static int +ipmi_detach(device_t self, int flags) +{ + int rc; + struct ipmi_softc *sc = device_private(self); + + sc->sc_thread_running = 0; + wakeup(&sc->sc_thread_running); + + if ((rc = sysmon_wdog_unregister(&sc->sc_wdog)) != 0) { + if (rc == ERESTART) + rc = EINTR; + return rc; + } + + /* cancel any pending countdown */ + sc->sc_wdog.smw_mode &= ~WDOG_MODE_MASK; + sc->sc_wdog.smw_mode |= WDOG_MODE_DISARMED; + sc->sc_wdog.smw_period = WDOG_PERIOD_DEFAULT; + + if ((rc = ipmi_watchdog_setmode(&sc->sc_wdog)) != 0) + return rc; + + ipmi_enabled = 0; + + sysmon_envsys_unregister(sc->sc_envsys); + + if (sc->sc_envsys != NULL) { + sysmon_envsys_destroy(sc->sc_envsys); + sc->sc_envsys = NULL; + } + + if (sc->sc_sensor != NULL) { + free(sc->sc_sensor, M_DEVBUF); + sc->sc_sensor = NULL; + } + + ipmi_unmap_regs(sc); + + callout_destroy(&sc->sc_callout); + mutex_destroy(&sc->sc_lock); + + return 0; +} + int ipmi_watchdog_setmode(struct sysmon_wdog *smwdog) {
CVS commit: src/sys/arch/x86/pci
Module Name:src Committed By: dyoung Date: Tue Apr 7 17:52:36 UTC 2009 Modified Files: src/sys/arch/x86/pci: pchb.c Log Message: Detach pchb(4) instances at shutdown. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/x86/pci/pchb.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/pci/pchb.c diff -u src/sys/arch/x86/pci/pchb.c:1.17 src/sys/arch/x86/pci/pchb.c:1.18 --- src/sys/arch/x86/pci/pchb.c:1.17 Tue Jan 27 08:34:45 2009 +++ src/sys/arch/x86/pci/pchb.c Tue Apr 7 17:52:36 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pchb.c,v 1.17 2009/01/27 08:34:45 markd Exp $ */ +/* $NetBSD: pchb.c,v 1.18 2009/04/07 17:52:36 dyoung Exp $ */ /*- * Copyright (c) 1996, 1998, 2000 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pchb.c,v 1.17 2009/01/27 08:34:45 markd Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pchb.c,v 1.18 2009/04/07 17:52:36 dyoung Exp $"); #include #include @@ -78,8 +78,8 @@ static bool pchb_resume(device_t PMF_FN_ARGS); static bool pchb_suspend(device_t PMF_FN_ARGS); -CFATTACH_DECL_NEW(pchb, sizeof(struct pchb_softc), -pchbmatch, pchbattach, pchbdetach, NULL); +CFATTACH_DECL3_NEW(pchb, sizeof(struct pchb_softc), +pchbmatch, pchbattach, pchbdetach, NULL, NULL, NULL, DVF_DETACH_SHUTDOWN); int pchbmatch(device_t parent, cfdata_t match, void *aux)
CVS commit: src/sys/arch/x86/isa
Module Name:src Committed By: dyoung Date: Tue Apr 7 17:51:46 UTC 2009 Modified Files: src/sys/arch/x86/isa: clock.c Log Message: Detach sysbeep0 at shutdown. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/arch/x86/isa/clock.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/isa/clock.c diff -u src/sys/arch/x86/isa/clock.c:1.31 src/sys/arch/x86/isa/clock.c:1.32 --- src/sys/arch/x86/isa/clock.c:1.31 Tue Dec 16 22:35:28 2008 +++ src/sys/arch/x86/isa/clock.c Tue Apr 7 17:51:46 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: clock.c,v 1.31 2008/12/16 22:35:28 christos Exp $ */ +/* $NetBSD: clock.c,v 1.32 2009/04/07 17:51:46 dyoung Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -121,7 +121,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.31 2008/12/16 22:35:28 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.32 2009/04/07 17:51:46 dyoung Exp $"); /* #define CLOCKDEBUG */ /* #define CLOCK_PARANOIA */ @@ -168,8 +168,9 @@ void sysbeepattach(device_t, device_t, void *); int sysbeepdetach(device_t, int); -CFATTACH_DECL_NEW(sysbeep, 0, -sysbeepmatch, sysbeepattach, sysbeepdetach, NULL); +CFATTACH_DECL3_NEW(sysbeep, 0, +sysbeepmatch, sysbeepattach, sysbeepdetach, NULL, NULL, NULL, +DVF_DETACH_SHUTDOWN); static int ppi_attached; static pcppi_tag_t ppicookie;
CVS commit: src/sys/dev/pci
Module Name:src Committed By: stacktic Date: Tue Apr 7 14:47:53 UTC 2009 Modified Files: src/sys/dev/pci: azalia_codec.c Log Message: Add Realtek ALC663 and treat like ALC662 (ok pooka@) To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/sys/dev/pci/azalia_codec.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/azalia_codec.c diff -u src/sys/dev/pci/azalia_codec.c:1.76 src/sys/dev/pci/azalia_codec.c:1.77 --- src/sys/dev/pci/azalia_codec.c:1.76 Sat Feb 28 17:12:13 2009 +++ src/sys/dev/pci/azalia_codec.c Tue Apr 7 14:47:53 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: azalia_codec.c,v 1.76 2009/02/28 17:12:13 jmcneill Exp $ */ +/* $NetBSD: azalia_codec.c,v 1.77 2009/04/07 14:47:53 stacktic Exp $ */ /*- * Copyright (c) 2005 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: azalia_codec.c,v 1.76 2009/02/28 17:12:13 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: azalia_codec.c,v 1.77 2009/04/07 14:47:53 stacktic Exp $"); #include #include @@ -213,6 +213,12 @@ this->mixer_init = generic_mixer_autoinit; this->init_widget = generic_mixer_init_widget; break; + case 0x10ec0663: + this->name = "Realtek ALC663"; + this->init_dacgroup = alc662_init_dacgroup; + this->mixer_init = generic_mixer_autoinit; + this->init_widget = generic_mixer_init_widget; + break; case 0x10ec0861: this->name = "Realtek ALC861"; this->init_dacgroup = alc861_init_dacgroup;
CVS commit: src
Module Name:src Committed By: apb Date: Tue Apr 7 13:52:08 UTC 2009 Modified Files: src/distrib/sets/lists/tests: mi src/tests/util: Makefile Added Files: src/tests/util/mtree: Atffile Makefile d_create.out t_mtree.sh Log Message: Add tests for mtree. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.5 -r1.6 src/tests/util/Makefile cvs rdiff -u -r0 -r1.1 src/tests/util/mtree/Atffile \ src/tests/util/mtree/Makefile src/tests/util/mtree/d_create.out \ src/tests/util/mtree/t_mtree.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.35 src/distrib/sets/lists/tests/mi:1.36 --- src/distrib/sets/lists/tests/mi:1.35 Sat Feb 28 13:32:51 2009 +++ src/distrib/sets/lists/tests/mi Tue Apr 7 13:52:08 2009 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.35 2009/02/28 13:32:51 njoly Exp $ +# $NetBSD: mi,v 1.36 2009/04/07 13:52:08 apb Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -984,6 +984,10 @@ ./usr/tests/util/make/d_varcmd.mk tests-util-tests ./usr/tests/util/make/d_varcmd.out tests-util-tests ./usr/tests/util/make/t_make tests-util-tests +./usr/tests/util/mtreetests-util-tests +./usr/tests/util/mtree/Atffile tests-util-tests +./usr/tests/util/mtree/d_create.out tests-util-tests +./usr/tests/util/mtree/t_mtree tests-util-tests ./usr/tests/util/pstests-util-tests ./usr/tests/util/ps/Atffile tests-util-tests ./usr/tests/util/ps/keywords tests-util-tests Index: src/tests/util/Makefile diff -u src/tests/util/Makefile:1.5 src/tests/util/Makefile:1.6 --- src/tests/util/Makefile:1.5 Fri Feb 13 05:19:51 2009 +++ src/tests/util/Makefile Tue Apr 7 13:52:07 2009 @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.5 2009/02/13 05:19:51 jmmv Exp $ +# $NetBSD: Makefile,v 1.6 2009/04/07 13:52:07 apb Exp $ .include TESTSDIR= ${TESTSBASE}/util -SUBDIR= awk bzip2 config cut df grep id m4 make ps sdiff sh +SUBDIR= awk bzip2 config cut df grep id m4 make mtree ps sdiff sh TESTS_SH= t_basename TESTS_SH+= t_cp Added files: Index: src/tests/util/mtree/Atffile diff -u /dev/null src/tests/util/mtree/Atffile:1.1 --- /dev/null Tue Apr 7 13:52:08 2009 +++ src/tests/util/mtree/Atffile Tue Apr 7 13:52:08 2009 @@ -0,0 +1,6 @@ +Content-Type: application/X-atf-atffile; version="1" +X-NetBSD-Id: "$NetBSD: Atffile,v 1.1 2009/04/07 13:52:08 apb Exp $" + +prop: test-suite = "NetBSD" + +tp: t_mtree Index: src/tests/util/mtree/Makefile diff -u /dev/null src/tests/util/mtree/Makefile:1.1 --- /dev/null Tue Apr 7 13:52:08 2009 +++ src/tests/util/mtree/Makefile Tue Apr 7 13:52:08 2009 @@ -0,0 +1,14 @@ +# $NetBSD: Makefile,v 1.1 2009/04/07 13:52:08 apb Exp $ + +NOMAN= # defined + +.include + +TESTSDIR= ${TESTSBASE}/util/mtree + +TESTS_SH= t_mtree + +FILESDIR= ${TESTSDIR} +FILES= d_create.out + +.include Index: src/tests/util/mtree/d_create.out diff -u /dev/null src/tests/util/mtree/d_create.out:1.1 --- /dev/null Tue Apr 7 13:52:08 2009 +++ src/tests/util/mtree/d_create.out Tue Apr 7 13:52:08 2009 @@ -0,0 +1,55 @@ +# user: x +# machine: x +# tree: x +# date: x + +# . +/set type=file nlink=1 +. type=dir nlink=4 +a.symlink.1 type=link +top.dangling \ +type=link +top.file.1 size=18 \ +sha256=74c53aaf0cd9543b7efad969de1058ee38859134ba467500b849811fc3513195 +top.symlink.b \ +type=link + +# ./a +a type=dir nlink=4 +a.file.1size=18 \ +sha256=bdbea62f7ccdf862f22254ea871d523845250010d5f233896e800142a859eef2 +a.file.2size=18 \ +sha256=77876d113fe1b45a41f8d1d3e178aaad7f91fcd93d3df782690625b74ad90fe6 +a.hardlink.b2 \ +nlink=2 size=18 \ +sha256=784fd6b95fe5054d87bf268de51dea043031c5e985f668d4f51e1c759b0f9333 + +# ./a/1 +1 type=dir nlink=2 +a1.file.1 size=21 \ +sha256=a062cd272facdd38c4fdeff2a18947b28c99a28a8fe51f88468978740382e592 +# ./a/1 +.. + + +# ./a/2 +2 type=dir nlink=2 +# ./a/2 +.. + +# ./a +.. + + +# ./b +b type=dir nlink=2 +b.file.1nlink=2 size=18 \ +sha256=5754b0d97a8238ea0e495ab871667dcab8f1d684e323290ae76f70c47de18998 +b.file.2nlink=2 size=18 \ +sha256=784fd6b95fe5054d87bf268de51dea043031c5e985f668d4f51e1c759b0f9333 +b.hardlink.1 \ +nlink=2 size=18 \ +sha256=5754b0d97a8238ea0e495ab871667dcab8f1d684e323290ae76f70c47de18998 +# ./b +.. + Index: src/tests/util/mtree/t_mtree.sh diff -u /dev/null src/tests/util/mtree/t_mtree.sh:1.1 --- /dev/null Tue Apr 7 13:52:08 2009 +++ src/tests/util/mtree/t_mtree.sh Tue Apr 7 13:52:08 2009 @@ -0,0 +1,106 @@ +# $NetBSD: t_mtree.sh,v 1.1 2009/04/07 13:52:
CVS commit: src/sbin/restore
Module Name:src Committed By: lukem Date: Tue Apr 7 12:38:13 UTC 2009 Modified Files: src/sbin/restore: dirs.c interactive.c symtab.c tape.c Log Message: fix sign-compare issues To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/sbin/restore/dirs.c cvs rdiff -u -r1.25 -r1.26 src/sbin/restore/interactive.c cvs rdiff -u -r1.24 -r1.25 src/sbin/restore/symtab.c cvs rdiff -u -r1.62 -r1.63 src/sbin/restore/tape.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/restore/dirs.c diff -u src/sbin/restore/dirs.c:1.47 src/sbin/restore/dirs.c:1.48 --- src/sbin/restore/dirs.c:1.47 Wed Feb 18 13:14:12 2009 +++ src/sbin/restore/dirs.c Tue Apr 7 12:38:12 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: dirs.c,v 1.47 2009/02/18 13:14:12 yamt Exp $ */ +/* $NetBSD: dirs.c,v 1.48 2009/04/07 12:38:12 lukem Exp $ */ /* * Copyright (c) 1983, 1993 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = "@(#)dirs.c 8.7 (Berkeley) 5/1/95"; #else -__RCSID("$NetBSD: dirs.c,v 1.47 2009/02/18 13:14:12 yamt Exp $"); +__RCSID("$NetBSD: dirs.c,v 1.48 2009/04/07 12:38:12 lukem Exp $"); #endif #endif /* not lint */ @@ -230,7 +230,7 @@ { struct inotab *itp; struct direct *dp; - int namelen; + size_t namelen; long bpt; char locname[MAXPATHLEN + 1]; Index: src/sbin/restore/interactive.c diff -u src/sbin/restore/interactive.c:1.25 src/sbin/restore/interactive.c:1.26 --- src/sbin/restore/interactive.c:1.25 Mon Dec 18 20:07:32 2006 +++ src/sbin/restore/interactive.c Tue Apr 7 12:38:12 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: interactive.c,v 1.25 2006/12/18 20:07:32 christos Exp $ */ +/* $NetBSD: interactive.c,v 1.26 2009/04/07 12:38:12 lukem Exp $ */ /* * Copyright (c) 1985, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)interactive.c 8.5 (Berkeley) 5/1/95"; #else -__RCSID("$NetBSD: interactive.c,v 1.25 2006/12/18 20:07:32 christos Exp $"); +__RCSID("$NetBSD: interactive.c,v 1.26 2009/04/07 12:38:12 lukem Exp $"); #endif #endif /* not lint */ @@ -71,7 +71,7 @@ struct afile { ino_t fnum; /* inode number of file */ char *fname; /* file name */ - short len; /* name length */ + size_t len; /* name length */ char prefix; /* prefix character */ char postfix; /* postfix character */ }; @@ -650,8 +650,10 @@ formatf(struct afile *list, int nentry) { struct afile *fp, *endlist; - int width, bigino, haveprefix, havepostfix; - int i, j, w, precision, columns, lines; + int haveprefix, havepostfix; + ino_t bigino; + size_t width, w; + int i, j, precision, columns, lines; width = 0; haveprefix = 0; Index: src/sbin/restore/symtab.c diff -u src/sbin/restore/symtab.c:1.24 src/sbin/restore/symtab.c:1.25 --- src/sbin/restore/symtab.c:1.24 Sun Feb 22 15:28:43 2009 +++ src/sbin/restore/symtab.c Tue Apr 7 12:38:12 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: symtab.c,v 1.24 2009/02/22 15:28:43 yamt Exp $ */ +/* $NetBSD: symtab.c,v 1.25 2009/04/07 12:38:12 lukem Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)symtab.c 8.3 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: symtab.c,v 1.24 2009/02/22 15:28:43 yamt Exp $"); +__RCSID("$NetBSD: symtab.c,v 1.25 2009/04/07 12:38:12 lukem Exp $"); #endif #endif /* not lint */ @@ -450,6 +450,7 @@ { struct entry *ep, *tep; ino_t i; + long l; struct entry temp, *tentry; long mynum = 1, stroff = 0; FILE *fd; @@ -505,11 +506,11 @@ /* * Convert entry pointers to indexes, and output */ - for (i = 0; i < entrytblsize; i++) { - if (entry[i] == NULL) + for (l = 0; l < entrytblsize; l++) { + if (entry[l] == NULL) tentry = NULL; else - tentry = (struct entry *)(long)entry[i]->e_index; + tentry = (struct entry *)(long)entry[l]->e_index; (void) fwrite((char *)&tentry, sizeof(struct entry *), 1, fd); } hdr.volno = checkpt; Index: src/sbin/restore/tape.c diff -u src/sbin/restore/tape.c:1.62 src/sbin/restore/tape.c:1.63 --- src/sbin/restore/tape.c:1.62 Wed Feb 18 13:13:27 2009 +++ src/sbin/restore/tape.c Tue Apr 7 12:38:13 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: tape.c,v 1.62 2009/02/18 13:13:27 yamt Exp $ */ +/* $NetBSD: tape.c,v 1.63 2009/04/07 12:38:13 lukem Exp $ */ /* * Copyright (c) 1983, 1993 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = "@(#)tape.c 8.9 (Berkeley) 5/1/95"; #else -__RCSID("$NetBSD: tape.c,v 1.62 2009/02/18 13:13:27 yamt Exp $"); +__RCSID("$NetBSD: tape.c,v 1.63 2009/04/07 12:38:13 lukem Exp $"); #endif #endif /* not lint */ @@ -864,7 +864,7 @@ for (i = 0; i < spcl.c_count; i++) { if (spcl.c_addr[i]) { readtape(&buf[curblk++][0]); - if (curblk == fssize / TP_BSIZE) { + if ((uint32_t)curblk == fssize / TP_BSIZE) { (*fill)((char *)buf, (long)(size > TP_BSIZE ? fssize : (curblk - 1) * TP_BSIZE + size)); curblk = 0;
CVS commit: src/sbin/tunefs
Module Name:src Committed By: lukem Date: Tue Apr 7 12:25:19 UTC 2009 Modified Files: src/sbin/tunefs: tunefs.c Log Message: fix sign-compare issue To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sbin/tunefs/tunefs.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/tunefs/tunefs.c diff -u src/sbin/tunefs/tunefs.c:1.38 src/sbin/tunefs/tunefs.c:1.39 --- src/sbin/tunefs/tunefs.c:1.38 Sun Feb 22 20:28:05 2009 +++ src/sbin/tunefs/tunefs.c Tue Apr 7 12:25:19 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: tunefs.c,v 1.38 2009/02/22 20:28:05 ad Exp $ */ +/* $NetBSD: tunefs.c,v 1.39 2009/04/07 12:25:19 lukem Exp $ */ /* * Copyright (c) 1983, 1993 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = "@(#)tunefs.c 8.3 (Berkeley) 5/3/95"; #else -__RCSID("$NetBSD: tunefs.c,v 1.38 2009/02/22 20:28:05 ad Exp $"); +__RCSID("$NetBSD: tunefs.c,v 1.39 2009/04/07 12:25:19 lukem Exp $"); #endif #endif /* not lint */ @@ -356,7 +356,7 @@ if (!in_fs_log) errx(1, "Can't change size of non-in-filesystem log"); - if (old_size == logfilesize && logfilesize > 0) { + if (logfilesize > 0 && old_size == (uint64_t)logfilesize) { /* no action */ warnx("log file size remains unchanged at %lld", logfilesize); return;
CVS commit: src/distrib
Module Name:src Committed By: joerg Date: Tue Apr 7 11:49:18 UTC 2009 Modified Files: src/distrib/amd64/ramdisks/common: Makefile.ramdisk src/distrib/amd64/ramdisks/ramdisk: Makefile list src/distrib/cats/ramdisk: Makefile list src/distrib/common: mtree.common src/distrib/evbarm/instkernel/ramdisk: Makefile list src/distrib/hpcarm/miniroot: Makefile.inc list src/distrib/hpcmips/miniroot: Makefile.inc list src/distrib/i386/ramdisks/ramdisk-big: Makefile list src/distrib/landisk/ramdisk: Makefile list src/distrib/mac68k/instkernel/ramdisk: Makefile list src/distrib/ofppc/ramdisks/common: Makefile.ramdisk src/distrib/ofppc/ramdisks/ramdisk: Makefile list src/distrib/sgimips/ramdisk: Makefile list src/distrib/shark/instkernel/ramdisk: Makefile list src/distrib/sparc64/instfs: Makefile list src/distrib/utils/sysinst: net.c src/distrib/zaurus/ramdisk: Makefile list Added Files: src/distrib/common: 10-resolv.conf 99-print-sysinst Makefile.dhcpcd list.dhcpcd Log Message: Change ramdisks from dhclient to dhcpcd and add corresponding glue to sysinst. For amd64, the crunchgen binary shrinks by 150KB uncompresssed, 60KB compressed. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/distrib/amd64/ramdisks/common/Makefile.ramdisk cvs rdiff -u -r1.1 -r1.2 src/distrib/amd64/ramdisks/ramdisk/Makefile cvs rdiff -u -r1.8 -r1.9 src/distrib/amd64/ramdisks/ramdisk/list cvs rdiff -u -r1.12 -r1.13 src/distrib/cats/ramdisk/Makefile cvs rdiff -u -r1.11 -r1.12 src/distrib/cats/ramdisk/list cvs rdiff -u -r0 -r1.1 src/distrib/common/10-resolv.conf \ src/distrib/common/99-print-sysinst src/distrib/common/Makefile.dhcpcd \ src/distrib/common/list.dhcpcd cvs rdiff -u -r1.8 -r1.9 src/distrib/common/mtree.common cvs rdiff -u -r1.5 -r1.6 src/distrib/evbarm/instkernel/ramdisk/Makefile cvs rdiff -u -r1.8 -r1.9 src/distrib/evbarm/instkernel/ramdisk/list cvs rdiff -u -r1.1 -r1.2 src/distrib/hpcarm/miniroot/Makefile.inc cvs rdiff -u -r1.2 -r1.3 src/distrib/hpcarm/miniroot/list cvs rdiff -u -r1.14 -r1.15 src/distrib/hpcmips/miniroot/Makefile.inc cvs rdiff -u -r1.10 -r1.11 src/distrib/hpcmips/miniroot/list cvs rdiff -u -r1.1 -r1.2 src/distrib/i386/ramdisks/ramdisk-big/Makefile cvs rdiff -u -r1.2 -r1.3 src/distrib/i386/ramdisks/ramdisk-big/list cvs rdiff -u -r1.2 -r1.3 src/distrib/landisk/ramdisk/Makefile cvs rdiff -u -r1.3 -r1.4 src/distrib/landisk/ramdisk/list cvs rdiff -u -r1.29 -r1.30 src/distrib/mac68k/instkernel/ramdisk/Makefile cvs rdiff -u -r1.20 -r1.21 src/distrib/mac68k/instkernel/ramdisk/list cvs rdiff -u -r1.2 -r1.3 src/distrib/ofppc/ramdisks/common/Makefile.ramdisk cvs rdiff -u -r1.1 -r1.2 src/distrib/ofppc/ramdisks/ramdisk/Makefile cvs rdiff -u -r1.3 -r1.4 src/distrib/ofppc/ramdisks/ramdisk/list cvs rdiff -u -r1.11 -r1.12 src/distrib/sgimips/ramdisk/Makefile cvs rdiff -u -r1.9 -r1.10 src/distrib/sgimips/ramdisk/list cvs rdiff -u -r1.14 -r1.15 src/distrib/shark/instkernel/ramdisk/Makefile cvs rdiff -u -r1.11 -r1.12 src/distrib/shark/instkernel/ramdisk/list cvs rdiff -u -r1.12 -r1.13 src/distrib/sparc64/instfs/Makefile cvs rdiff -u -r1.9 -r1.10 src/distrib/sparc64/instfs/list cvs rdiff -u -r1.121 -r1.122 src/distrib/utils/sysinst/net.c cvs rdiff -u -r1.3 -r1.4 src/distrib/zaurus/ramdisk/Makefile cvs rdiff -u -r1.4 -r1.5 src/distrib/zaurus/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/amd64/ramdisks/common/Makefile.ramdisk diff -u src/distrib/amd64/ramdisks/common/Makefile.ramdisk:1.4 src/distrib/amd64/ramdisks/common/Makefile.ramdisk:1.5 --- src/distrib/amd64/ramdisks/common/Makefile.ramdisk:1.4 Sun Jan 25 22:08:37 2009 +++ src/distrib/amd64/ramdisks/common/Makefile.ramdisk Tue Apr 7 11:49:16 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.ramdisk,v 1.4 2009/01/25 22:08:37 abs Exp $ +# $NetBSD: Makefile.ramdisk,v 1.5 2009/04/07 11:49:16 joerg Exp $ .include .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib" @@ -39,6 +39,7 @@ ${CRUNCHBIN}: libhack.o .include "${DISTRIBDIR}/common/Makefile.crunch" +.include "${DISTRIBDIR}/common/Makefile.dhcpcd" .include "${DISTRIBDIR}/common/Makefile.makedev" .include "${DISTRIBDIR}/common/Makefile.image" Index: src/distrib/amd64/ramdisks/ramdisk/Makefile diff -u src/distrib/amd64/ramdisks/ramdisk/Makefile:1.1 src/distrib/amd64/ramdisks/ramdisk/Makefile:1.2 --- src/distrib/amd64/ramdisks/ramdisk/Makefile:1.1 Fri Jun 2 22:11:52 2006 +++ src/distrib/amd64/ramdisks/ramdisk/Makefile Tue Apr 7 11:49:16 2009 @@ -1,9 +1,8 @@ -# $NetBSD: Makefile,v 1.1 2006/06/02 22:11:52 hubertf Exp $ +# $NetBSD: Makefile,v 1.2 2009/04/07 11:49:16 joerg Exp $ IMAGE= ramdisk.fs IMAGESIZE= 5000k -IMAGEDEPENDS= disktab.preinstall \ - ${NETBSDSRCDIR}/usr.sbin/dhcp/clientscript/dhclient-script +IMAG
CVS commit: src/sys/kern
Module Name:src Committed By: tsutsui Date: Tue Apr 7 10:49:54 UTC 2009 Modified Files: src/sys/kern: init_main.c Log Message: Explicitly pass a specific buffer length to format_bytes() to make it print memory sizes in humanized readable digits. To generate a diff of this commit: cvs rdiff -u -r1.387 -r1.388 src/sys/kern/init_main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/init_main.c diff -u src/sys/kern/init_main.c:1.387 src/sys/kern/init_main.c:1.388 --- src/sys/kern/init_main.c:1.387 Thu Apr 2 19:43:11 2009 +++ src/sys/kern/init_main.c Tue Apr 7 10:49:54 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: init_main.c,v 1.387 2009/04/02 19:43:11 ad Exp $ */ +/* $NetBSD: init_main.c,v 1.388 2009/04/07 10:49:54 tsutsui Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -97,7 +97,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.387 2009/04/02 19:43:11 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.388 2009/04/07 10:49:54 tsutsui Exp $"); #include "opt_ddb.h" #include "opt_ipsec.h" @@ -919,6 +919,8 @@ * - Print a limited banner if AB_SILENT. * - Always send normal banner to the log. */ +#define MEM_PBUFSIZE sizeof("9 MB") + void banner(void) { @@ -942,8 +944,8 @@ memset(pbuf, 0, sizeof(pbuf)); (*pr)("%s%s", copyright, version); - format_bytes(pbuf, sizeof(pbuf), ctob((uint64_t)physmem)); + format_bytes(pbuf, MEM_PBUFSIZE, ctob((uint64_t)physmem)); (*pr)("total memory = %s\n", pbuf); - format_bytes(pbuf, sizeof(pbuf), ctob((uint64_t)uvmexp.free)); + format_bytes(pbuf, MEM_PBUFSIZE, ctob((uint64_t)uvmexp.free)); (*pr)("avail memory = %s\n", pbuf); }
CVS commit: src/distrib/utils/sysinst
Module Name:src Committed By: tsutsui Date: Tue Apr 7 10:45:06 UTC 2009 Modified Files: src/distrib/utils/sysinst: bsddisklabel.c defs.h disks.c msg.mi.de msg.mi.en msg.mi.es msg.mi.fr msg.mi.pl src/distrib/utils/sysinst/arch/acorn32: md.h src/distrib/utils/sysinst/arch/alpha: md.c md.h src/distrib/utils/sysinst/arch/amd64: md.h src/distrib/utils/sysinst/arch/arc: md.h src/distrib/utils/sysinst/arch/cobalt: md.h src/distrib/utils/sysinst/arch/i386: md.c md.h msg.md.de msg.md.en msg.md.es msg.md.fr msg.md.pl src/distrib/utils/sysinst/arch/macppc: md.h src/distrib/utils/sysinst/arch/sgimips: md.h src/distrib/utils/sysinst/arch/sparc: md.h Log Message: Improve UFS2 root handling on sysinst: - add HAVE_UFS2_BOOT define on ports which have UFS2 capable loader - reject UFS2 for root file system on ports !HAVE_UFS2_BOOT - add a MI function to get bootxx name from root file system type per MD defines and remove md_bootxx_name() from arch/i386/md.c, so that alpha can use bootxx_ffsv2 for UFS2 as well as x86 Tested on i386 and alpha with FFSv1 and FFSv2, and also tested on vax (on simh) for !HAVE_UFS2_BOOT case. de translation is provided by mar...@. No objection on tech-install, and "move forward with it" from pe...@. XXX1: not tested on all ports, more ports might/could have UFS2 root support XXX2: no es, fr, and pl translations, even en message should be improved XXX3: alpha has a fixed en message without MSG To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/distrib/utils/sysinst/bsddisklabel.c cvs rdiff -u -r1.141 -r1.142 src/distrib/utils/sysinst/defs.h cvs rdiff -u -r1.103 -r1.104 src/distrib/utils/sysinst/disks.c cvs rdiff -u -r1.47 -r1.48 src/distrib/utils/sysinst/msg.mi.de cvs rdiff -u -r1.152 -r1.153 src/distrib/utils/sysinst/msg.mi.en cvs rdiff -u -r1.24 -r1.25 src/distrib/utils/sysinst/msg.mi.es cvs rdiff -u -r1.104 -r1.105 src/distrib/utils/sysinst/msg.mi.fr cvs rdiff -u -r1.63 -r1.64 src/distrib/utils/sysinst/msg.mi.pl cvs rdiff -u -r1.18 -r1.19 src/distrib/utils/sysinst/arch/acorn32/md.h cvs rdiff -u -r1.45 -r1.46 src/distrib/utils/sysinst/arch/alpha/md.c cvs rdiff -u -r1.21 -r1.22 src/distrib/utils/sysinst/arch/alpha/md.h cvs rdiff -u -r1.24 -r1.25 src/distrib/utils/sysinst/arch/amd64/md.h cvs rdiff -u -r1.14 -r1.15 src/distrib/utils/sysinst/arch/arc/md.h cvs rdiff -u -r1.1 -r1.2 src/distrib/utils/sysinst/arch/cobalt/md.h cvs rdiff -u -r1.120 -r1.121 src/distrib/utils/sysinst/arch/i386/md.c cvs rdiff -u -r1.65 -r1.66 src/distrib/utils/sysinst/arch/i386/md.h cvs rdiff -u -r1.15 -r1.16 src/distrib/utils/sysinst/arch/i386/msg.md.de cvs rdiff -u -r1.57 -r1.58 src/distrib/utils/sysinst/arch/i386/msg.md.en cvs rdiff -u -r1.10 -r1.11 src/distrib/utils/sysinst/arch/i386/msg.md.es cvs rdiff -u -r1.47 -r1.48 src/distrib/utils/sysinst/arch/i386/msg.md.fr cvs rdiff -u -r1.30 -r1.31 src/distrib/utils/sysinst/arch/i386/msg.md.pl cvs rdiff -u -r1.16 -r1.17 src/distrib/utils/sysinst/arch/macppc/md.h cvs rdiff -u -r1.23 -r1.24 src/distrib/utils/sysinst/arch/sgimips/md.h cvs rdiff -u -r1.23 -r1.24 src/distrib/utils/sysinst/arch/sparc/md.h 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/sysinst/bsddisklabel.c diff -u src/distrib/utils/sysinst/bsddisklabel.c:1.50 src/distrib/utils/sysinst/bsddisklabel.c:1.51 --- src/distrib/utils/sysinst/bsddisklabel.c:1.50 Sun Apr 5 00:50:51 2009 +++ src/distrib/utils/sysinst/bsddisklabel.c Tue Apr 7 10:45:04 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: bsddisklabel.c,v 1.50 2009/04/05 00:50:51 tsutsui Exp $ */ +/* $NetBSD: bsddisklabel.c,v 1.51 2009/04/07 10:45:04 tsutsui Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -56,6 +56,8 @@ #include "msg_defs.h" #include "menu_defs.h" +static int check_partitions(void); + /* For the current state of this file blame a...@netbsd.org */ /* Even though he wasn't the last to hack it, but he did admit doing so :-) */ @@ -704,7 +706,7 @@ msg_display(MSG_abort); return 0; } - if (md_check_partitions() == 0) + if (check_partitions() == 0) goto edit_check; /* Disk name */ @@ -716,3 +718,41 @@ /* Everything looks OK. */ return (1); } + +/* + * check that there is at least a / somewhere. + */ +static int +check_partitions(void) +{ +#ifdef HAVE_BOOTXX_xFS + int rv; + char *bootxx; +#endif +#ifndef HAVE_UFS2_BOOT + int fstype; +#endif + +#ifdef HAVE_BOOTXX_xFS + /* check if we have boot code for the root partition type */ + bootxx = bootxx_name(); + if (bootxx != NULL) { + rv = access(bootxx, R_OK); + free(bootxx); + } + if (bootxx == NULL || rv != 0) { + process_menu(MENU_ok, deconst(MSG_No_Bootcode)); + return 0; + } +#endif +#ifndef HAVE_UFS2_BOOT + fstype = bsdlabel[rootpart].pi_fstype; + if (fstype == FS_BSDFFS && + (bsdlabel[rootpart].pi_flags & PIF_