svn commit: r226679 - head/sys/dev/iwn
Author: bschmidt Date: Mon Oct 24 07:37:01 2011 New Revision: 226679 URL: http://svn.freebsd.org/changeset/base/226679 Log: Let net80211 also know about stopped BA sessions. This fixes some issues where the driver assumed that BA resources are still available due to net80211 saying so. PR: 161407, 159768 Tested by:cperciva, rene MFC after:3 days Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c == --- head/sys/dev/iwn/if_iwn.c Mon Oct 24 05:26:40 2011(r226678) +++ head/sys/dev/iwn/if_iwn.c Mon Oct 24 07:37:01 2011(r226679) @@ -5641,6 +5641,7 @@ iwn_ampdu_tx_stop(struct ieee80211_node sc->qid2tap[qid] = NULL; free(tap->txa_private, M_DEVBUF); tap->txa_private = NULL; + sc->sc_addba_stop(ni, tap); } static void ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r226680 - head/sys/dev/ata
Author: mav Date: Mon Oct 24 08:47:23 2011 New Revision: 226680 URL: http://svn.freebsd.org/changeset/base/226680 Log: Some dmesg cosmetics: - for the legacy PCI ATA channels move channel number out of the device description, same as it is for ahci(4), siis(4) and mvs(4); - add device description for the ISA ATA channels. Modified: head/sys/dev/ata/ata-isa.c head/sys/dev/ata/ata-pci.c head/sys/dev/ata/ata-pci.h Modified: head/sys/dev/ata/ata-isa.c == --- head/sys/dev/ata/ata-isa.c Mon Oct 24 07:37:01 2011(r226679) +++ head/sys/dev/ata/ata-isa.c Mon Oct 24 08:47:23 2011(r226680) @@ -92,6 +92,7 @@ ata_isa_probe(device_t dev) bus_release_resource(dev, SYS_RES_IOPORT, ATA_CTLADDR_RID, ctlio); bus_release_resource(dev, SYS_RES_IOPORT, ATA_IOADDR_RID, io); +device_set_desc(dev, "ATA channel"); return (ata_probe(dev)); } Modified: head/sys/dev/ata/ata-pci.c == --- head/sys/dev/ata/ata-pci.c Mon Oct 24 07:37:01 2011(r226679) +++ head/sys/dev/ata/ata-pci.c Mon Oct 24 08:47:23 2011(r226680) @@ -545,6 +545,19 @@ ata_pci_dmafini(device_t dev) } int +ata_pci_print_child(device_t dev, device_t child) +{ + int retval; + + retval = bus_print_child_header(dev, child); + retval += printf(" at channel %d", + (int)(intptr_t)device_get_ivars(child)); + retval += bus_print_child_footer(dev, child); + + return (retval); +} + +int ata_pci_child_location_str(device_t dev, device_t child, char *buf, size_t buflen) { @@ -574,6 +587,7 @@ static device_method_t ata_pci_methods[] DEVMETHOD(bus_teardown_intr,ata_pci_teardown_intr), DEVMETHOD(pci_read_config, ata_pci_read_config), DEVMETHOD(pci_write_config,ata_pci_write_config), +DEVMETHOD(bus_print_child, ata_pci_print_child), DEVMETHOD(bus_child_location_str, ata_pci_child_location_str), { 0, 0 } @@ -594,12 +608,10 @@ MODULE_DEPEND(atapci, ata, 1, 1, 1); static int ata_pcichannel_probe(device_t dev) { -char buffer[32]; if ((intptr_t)device_get_ivars(dev) < 0) return (ENXIO); -sprintf(buffer, "ATA channel %d", (int)(intptr_t)device_get_ivars(dev)); -device_set_desc_copy(dev, buffer); +device_set_desc(dev, "ATA channel"); return ata_probe(dev); } Modified: head/sys/dev/ata/ata-pci.h == --- head/sys/dev/ata/ata-pci.h Mon Oct 24 07:37:01 2011(r226679) +++ head/sys/dev/ata/ata-pci.h Mon Oct 24 08:47:23 2011(r226680) @@ -549,6 +549,7 @@ int ata_pci_write_ivar(device_t dev, dev uint32_t ata_pci_read_config(device_t dev, device_t child, int reg, int width); void ata_pci_write_config(device_t dev, device_t child, int reg, uint32_t val, int width); +int ata_pci_print_child(device_t dev, device_t child); int ata_pci_child_location_str(device_t dev, device_t child, char *buf, size_t buflen); struct resource * ata_pci_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags); @@ -601,6 +602,7 @@ static device_method_t __CONCAT(dname,_m DEVMETHOD(bus_teardown_intr,ata_pci_teardown_intr), \ DEVMETHOD(pci_read_config, ata_pci_read_config), \ DEVMETHOD(pci_write_config,ata_pci_write_config), \ +DEVMETHOD(bus_print_child, ata_pci_print_child), \ DEVMETHOD(bus_child_location_str, ata_pci_child_location_str), \ { 0, 0 } \ }; \ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r226673 - head/sys/kern
on 23/10/2011 23:03 Marcel Moolenaar said the following: > Author: marcel > Date: Sun Oct 23 20:03:33 2011 > New Revision: 226673 > URL: http://svn.freebsd.org/changeset/base/226673 > > Log: > Don't terminate the interactive root mount prompt on mount failure. > This restores the previous behaviour. While here, match '?' and '.' > inputs exactly and improve the error message. > > Requested by: avg@ > Derived from a patch by: Arnaud Lacombe > > Modified: > head/sys/kern/vfs_mountroot.c Thank you very much! Just to be sure - you are planning to MFC this to stable/9? -- Andriy Gapon ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r226681 - head/sys/fs/nullfs
Author: pho Date: Mon Oct 24 10:35:37 2011 New Revision: 226681 URL: http://svn.freebsd.org/changeset/base/226681 Log: Only unlock if the lock is exclusive. Reported by: Subbsd Discussed with: kib Modified: head/sys/fs/nullfs/null_vfsops.c Modified: head/sys/fs/nullfs/null_vfsops.c == --- head/sys/fs/nullfs/null_vfsops.cMon Oct 24 08:47:23 2011 (r226680) +++ head/sys/fs/nullfs/null_vfsops.cMon Oct 24 10:35:37 2011 (r226681) @@ -104,11 +104,10 @@ nullfs_mount(struct mount *mp) return (EINVAL); /* -* Unlock lower node to avoid deadlock. -* (XXX) VOP_ISLOCKED is needed? +* Unlock lower node to avoid possible deadlock. */ if ((mp->mnt_vnodecovered->v_op == &null_vnodeops) && - VOP_ISLOCKED(mp->mnt_vnodecovered)) { + VOP_ISLOCKED(mp->mnt_vnodecovered) == LK_EXCLUSIVE) { VOP_UNLOCK(mp->mnt_vnodecovered, 0); isvnunlocked = 1; } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r226683 - head/usr.sbin/bsnmpd/modules/snmp_hostres
Author: ivoras Date: Mon Oct 24 12:21:58 2011 New Revision: 226683 URL: http://svn.freebsd.org/changeset/base/226683 Log: Fix typo MFC after:1 month Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_diskstorage_tbl.c head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_tree.def Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_diskstorage_tbl.c == --- head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_diskstorage_tbl.c Mon Oct 24 10:48:13 2011(r226682) +++ head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_diskstorage_tbl.c Mon Oct 24 12:21:58 2011(r226683) @@ -634,7 +634,7 @@ op_hrDiskStorageTable(struct snmp_contex value->v.integer = entry->media; return (SNMP_ERR_NOERROR); - case LEAF_hrDiskStorageRemoveble: + case LEAF_hrDiskStorageRemovable: value->v.integer = entry->removable; return (SNMP_ERR_NOERROR); Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_tree.def == --- head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_tree.def Mon Oct 24 10:48:13 2011(r226682) +++ head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_tree.def Mon Oct 24 12:21:58 2011(r226683) @@ -149,7 +149,7 @@ (1 hrDiskStorageEntry : INTEGER op_hrDiskStorageTable (1 hrDiskStorageAccess INTEGER GET) (2 hrDiskStorageMedia INTEGER GET) - (3 hrDiskStorageRemoveble INTEGER GET) + (3 hrDiskStorageRemovable INTEGER GET) (4 hrDiskStorageCapacity INTEGER GET) ) ) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r226684 - head/usr.sbin/bsnmpd/modules/snmp_hostres
Author: ivoras Date: Mon Oct 24 12:43:20 2011 New Revision: 226684 URL: http://svn.freebsd.org/changeset/base/226684 Log: It seems that the warning is much less severe than its message says. The device is certainly added to the list after the first pass. Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_diskstorage_tbl.c Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_diskstorage_tbl.c == --- head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_diskstorage_tbl.c Mon Oct 24 12:21:58 2011(r226683) +++ head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_diskstorage_tbl.c Mon Oct 24 12:43:20 2011(r226684) @@ -442,7 +442,7 @@ disk_OS_get_disks(void) /* * not found there - insert it as immutable */ - syslog(LOG_WARNING, "%s: device '%s' not in " + syslog(LOG_WARNING, "%s: adding device '%s' to " "device list", __func__, disk); if ((entry = device_entry_create(disk, "", "")) == NULL) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r226685 - head/usr.sbin/bsnmpd/modules/snmp_hostres
Author: ivoras Date: Mon Oct 24 12:59:39 2011 New Revision: 226685 URL: http://svn.freebsd.org/changeset/base/226685 Log: Apparently, "ada" drives are better treated similarly to "da" drives. Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_diskstorage_tbl.c Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_diskstorage_tbl.c == --- head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_diskstorage_tbl.c Mon Oct 24 12:43:20 2011(r226684) +++ head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_diskstorage_tbl.c Mon Oct 24 12:59:39 2011(r226685) @@ -476,7 +476,8 @@ disk_OS_get_disks(void) disk_entry->media = DSM_UNKNOWN; disk_entry->removable = SNMP_FALSE; - if (strncmp(disk_entry->dev_name, "da", 2) == 0) { + if (strncmp(disk_entry->dev_name, "da", 2) == 0 || + strncmp(disk_entry->dev_name, "ada", 3) == 0) { disk_entry->media = DSM_HARDDISK; disk_entry->removable = SNMP_FALSE; } else if (strncmp(disk_entry->dev_name, "cd", 2) == 0) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r226686 - head/sys/fs/nullfs
Author: kib Date: Mon Oct 24 13:48:13 2011 New Revision: 226686 URL: http://svn.freebsd.org/changeset/base/226686 Log: The covered vnode must be reloced if it was unlocked. Remove VOP_ISLOCKED test because of this and also because it can lead to false positives. Tested by:pho MFC after:1 week Modified: head/sys/fs/nullfs/null_vfsops.c Modified: head/sys/fs/nullfs/null_vfsops.c == --- head/sys/fs/nullfs/null_vfsops.cMon Oct 24 12:59:39 2011 (r226685) +++ head/sys/fs/nullfs/null_vfsops.cMon Oct 24 13:48:13 2011 (r226686) @@ -119,7 +119,7 @@ nullfs_mount(struct mount *mp) /* * Re-lock vnode. */ - if (isvnunlocked && !VOP_ISLOCKED(mp->mnt_vnodecovered)) + if (isvnunlocked) vn_lock(mp->mnt_vnodecovered, LK_EXCLUSIVE | LK_RETRY); if (error) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r226687 - head/sys/fs/nullfs
Author: kib Date: Mon Oct 24 13:53:32 2011 New Revision: 226687 URL: http://svn.freebsd.org/changeset/base/226687 Log: The only possible error return from null_nodeget() is due to insmntque1 failure (the getnewvnode cannot return an error). In this case, the null_insmntque_dtr() already unlocked the reclaimed vnode, so VOP_UNLOCK() in the nullfs_mount() after null_nodeget() failure is wrong. Tested by:pho MFC after:1 week Modified: head/sys/fs/nullfs/null_vfsops.c Modified: head/sys/fs/nullfs/null_vfsops.c == --- head/sys/fs/nullfs/null_vfsops.cMon Oct 24 13:48:13 2011 (r226686) +++ head/sys/fs/nullfs/null_vfsops.cMon Oct 24 13:53:32 2011 (r226687) @@ -157,7 +157,6 @@ nullfs_mount(struct mount *mp) * Make sure the node alias worked */ if (error) { - VOP_UNLOCK(vp, 0); vrele(lowerrootvp); free(xmp, M_NULLFSMNT); /* XXX */ return (error); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r226688 - head/sys/fs/nullfs
Author: kib Date: Mon Oct 24 13:56:31 2011 New Revision: 226688 URL: http://svn.freebsd.org/changeset/base/226688 Log: The use of VOP_ISLOCKED() without a check for the return values can cause false positives. Replace the #ifdef block with the proper ASSERT_VOP_UNLOCKED() assert. Tested by:pho MFC after:1 week Modified: head/sys/fs/nullfs/null_vfsops.c Modified: head/sys/fs/nullfs/null_vfsops.c == --- head/sys/fs/nullfs/null_vfsops.cMon Oct 24 13:53:32 2011 (r226687) +++ head/sys/fs/nullfs/null_vfsops.cMon Oct 24 13:56:31 2011 (r226688) @@ -242,10 +242,7 @@ nullfs_root(mp, flags, vpp) vp = MOUNTTONULLMOUNT(mp)->nullm_rootvp; VREF(vp); -#ifdef NULLFS_DEBUG - if (VOP_ISLOCKED(vp)) - panic("root vnode is locked.\n"); -#endif + ASSERT_VOP_UNLOCKED(vp, "root vnode is locked"); vn_lock(vp, flags | LK_RETRY); *vpp = vp; return 0; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r226687 - head/sys/fs/nullfs
On Mon, Oct 24, 2011 at 01:53:32PM +, Konstantin Belousov wrote: > Author: kib > Date: Mon Oct 24 13:53:32 2011 > New Revision: 226687 > URL: http://svn.freebsd.org/changeset/base/226687 > > Log: > The only possible error return from null_nodeget() is due to insmntque1 > failure (the getnewvnode cannot return an error). In this case, the > null_insmntque_dtr() already unlocked the reclaimed vnode, so VOP_UNLOCK() > in the nullfs_mount() after null_nodeget() failure is wrong. > > Tested by: pho > MFC after: 1 week > > Modified: > head/sys/fs/nullfs/null_vfsops.c > > Modified: head/sys/fs/nullfs/null_vfsops.c > == > --- head/sys/fs/nullfs/null_vfsops.c Mon Oct 24 13:48:13 2011 > (r226686) > +++ head/sys/fs/nullfs/null_vfsops.c Mon Oct 24 13:53:32 2011 > (r226687) > @@ -157,7 +157,6 @@ nullfs_mount(struct mount *mp) >* Make sure the node alias worked >*/ > if (error) { > - VOP_UNLOCK(vp, 0); Maybe you want to assert that it's indeed unlocked at this point? roman ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r226690 - head/usr.sbin/ypbind
Author: glebius Date: Mon Oct 24 14:35:31 2011 New Revision: 226690 URL: http://svn.freebsd.org/changeset/base/226690 Log: Protect NIS client with madvise(2) since this daemon is required for succesful authentication of users. Modified: head/usr.sbin/ypbind/ypbind.c Modified: head/usr.sbin/ypbind/ypbind.c == --- head/usr.sbin/ypbind/ypbind.c Mon Oct 24 14:23:40 2011 (r226689) +++ head/usr.sbin/ypbind/ypbind.c Mon Oct 24 14:35:31 2011 (r226690) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -465,6 +466,9 @@ main(int argc, char *argv[]) openlog(argv[0], LOG_PID, LOG_DAEMON); + if (madvise(NULL, 0, MADV_PROTECT) != 0) + syslog(LOG_WARNING, "madvise(): %m"); + /* Kick off the default domain */ broadcast(ypbindlist); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r226687 - head/sys/fs/nullfs
On Mon, Oct 24, 2011 at 04:22:45PM +0200, Roman Divacky wrote: > On Mon, Oct 24, 2011 at 01:53:32PM +, Konstantin Belousov wrote: > > Author: kib > > Date: Mon Oct 24 13:53:32 2011 > > New Revision: 226687 > > URL: http://svn.freebsd.org/changeset/base/226687 > > > > Log: > > The only possible error return from null_nodeget() is due to insmntque1 > > failure (the getnewvnode cannot return an error). In this case, the > > null_insmntque_dtr() already unlocked the reclaimed vnode, so VOP_UNLOCK() > > in the nullfs_mount() after null_nodeget() failure is wrong. > > > > Tested by:pho > > MFC after:1 week > > > > Modified: > > head/sys/fs/nullfs/null_vfsops.c > > > > Modified: head/sys/fs/nullfs/null_vfsops.c > > == > > --- head/sys/fs/nullfs/null_vfsops.cMon Oct 24 13:48:13 2011 > > (r226686) > > +++ head/sys/fs/nullfs/null_vfsops.cMon Oct 24 13:53:32 2011 > > (r226687) > > @@ -157,7 +157,6 @@ nullfs_mount(struct mount *mp) > > * Make sure the node alias worked > > */ > > if (error) { > > - VOP_UNLOCK(vp, 0); > > Maybe you want to assert that it's indeed unlocked at this point? No, I don't, since the vnode pointer is already invalid at this point. The vput() call in dtr released the vnode reference owned by current thread. pgpoXsF1E0Zsp.pgp Description: PGP signature
Re: svn commit: r226673 - head/sys/kern
On Oct 24, 2011, at 2:27 AM, Andriy Gapon wrote: > on 23/10/2011 23:03 Marcel Moolenaar said the following: >> Author: marcel >> Date: Sun Oct 23 20:03:33 2011 >> New Revision: 226673 >> URL: http://svn.freebsd.org/changeset/base/226673 >> >> Log: >> Don't terminate the interactive root mount prompt on mount failure. >> This restores the previous behaviour. While here, match '?' and '.' >> inputs exactly and improve the error message. >> >> Requested by: avg@ >> Derived from a patch by: Arnaud Lacombe >> >> Modified: >> head/sys/kern/vfs_mountroot.c > > Thank you very much! > Just to be sure - you are planning to MFC this to stable/9? Yes, I will. In a week or so. Please test it and let me know if it's good enough for you or if can tweak it a bit more. FYI, -- Marcel Moolenaar mar...@xcllnt.net ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r226695 - head/sys/dev/dc
Author: yongari Date: Mon Oct 24 17:05:59 2011 New Revision: 226695 URL: http://svn.freebsd.org/changeset/base/226695 Log: Fix a regression introduced in r218832. For TX status check, driver should use a TX list DMA tag. MFC after:3 days Modified: head/sys/dev/dc/if_dc.c Modified: head/sys/dev/dc/if_dc.c == --- head/sys/dev/dc/if_dc.c Mon Oct 24 15:50:23 2011(r226694) +++ head/sys/dev/dc/if_dc.c Mon Oct 24 17:05:59 2011(r226695) @@ -2970,7 +2970,7 @@ dc_txeof(struct dc_softc *sc) * Go through our tx list and free mbufs for those * frames that have been transmitted. */ - bus_dmamap_sync(sc->dc_rx_ltag, sc->dc_tx_lmap, BUS_DMASYNC_POSTREAD | + bus_dmamap_sync(sc->dc_tx_ltag, sc->dc_tx_lmap, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); setup = 0; for (idx = sc->dc_cdata.dc_tx_cons; idx != sc->dc_cdata.dc_tx_prod; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r226696 - head/sys/dev/dc
Author: yongari Date: Mon Oct 24 17:09:22 2011 New Revision: 226696 URL: http://svn.freebsd.org/changeset/base/226696 Log: Add missing bus_dmamap_sync() in setup frame transmit. MFC after:3 days Modified: head/sys/dev/dc/if_dc.c Modified: head/sys/dev/dc/if_dc.c == --- head/sys/dev/dc/if_dc.c Mon Oct 24 17:05:59 2011(r226695) +++ head/sys/dev/dc/if_dc.c Mon Oct 24 17:09:22 2011(r226696) @@ -1136,6 +1136,8 @@ dc_setfilt_21143(struct dc_softc *sc) sp[41] = DC_SP_MAC(eaddr[2]); sframe->dc_status = htole32(DC_TXSTAT_OWN); + bus_dmamap_sync(sc->dc_tx_ltag, sc->dc_tx_lmap, BUS_DMASYNC_PREREAD | + BUS_DMASYNC_PREWRITE); bus_dmamap_sync(sc->dc_stag, sc->dc_smap, BUS_DMASYNC_PREWRITE); CSR_WRITE_4(sc, DC_TXSTART, 0x); @@ -1342,6 +1344,8 @@ dc_setfilt_xircom(struct dc_softc *sc) DC_SETBIT(sc, DC_NETCFG, DC_NETCFG_TX_ON); DC_SETBIT(sc, DC_NETCFG, DC_NETCFG_RX_ON); sframe->dc_status = htole32(DC_TXSTAT_OWN); + bus_dmamap_sync(sc->dc_tx_ltag, sc->dc_tx_lmap, BUS_DMASYNC_PREREAD | + BUS_DMASYNC_PREWRITE); bus_dmamap_sync(sc->dc_stag, sc->dc_smap, BUS_DMASYNC_PREWRITE); CSR_WRITE_4(sc, DC_TXSTART, 0x); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r226697 - head/usr.sbin/pkg_install/info
Author: emaste Date: Mon Oct 24 18:29:50 2011 New Revision: 226697 URL: http://svn.freebsd.org/changeset/base/226697 Log: Avoid printing // for packages that install to / I have some packages that install to / (for whatever reason). Right now we print entries of the form //path/to/file when listing files (pkg_info -L, pkg_info -g etc.) This change avoids printing the redundant / . Modified: head/usr.sbin/pkg_install/info/show.c Modified: head/usr.sbin/pkg_install/info/show.c == --- head/usr.sbin/pkg_install/info/show.c Mon Oct 24 17:09:22 2011 (r226696) +++ head/usr.sbin/pkg_install/info/show.c Mon Oct 24 18:29:50 2011 (r226697) @@ -207,6 +207,14 @@ show_plist(const char *title, Package *p } } +const char * +elide_root(const char *dir) +{ +if (strcmp(dir, "/") == 0) + return ""; +return dir; +} + /* Show all files in the packing list (except ignored ones) */ void show_files(const char *title, Package *plist) @@ -223,7 +231,7 @@ show_files(const char *title, Package *p switch(p->type) { case PLIST_FILE: if (!ign) - printf("%s/%s\n", dir, p->name); + printf("%s/%s\n", elide_root(dir), p->name); ign = FALSE; break; @@ -270,7 +278,7 @@ show_size(const char *title, Package *pl switch (p->type) { case PLIST_FILE: if (!ign) { - snprintf(tmp, FILENAME_MAX, "%s/%s", dir, p->name); + snprintf(tmp, FILENAME_MAX, "%s/%s", elide_root(dir), p->name); if (!lstat(tmp, &sb)) { size += sb.st_size; if (Verbose) @@ -328,7 +336,7 @@ show_cksum(const char *title, Package *p else dir = p->name; } else if (p->type == PLIST_FILE) { - snprintf(tmp, FILENAME_MAX, "%s/%s", dir, p->name); + snprintf(tmp, FILENAME_MAX, "%s/%s", elide_root(dir), p->name); if (!fexists(tmp)) warnx("%s doesn't exist", tmp); else if (p->next && p->next->type == PLIST_COMMENT && ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r226698 - head/sys/conf
Author: dim Date: Mon Oct 24 18:35:16 2011 New Revision: 226698 URL: http://svn.freebsd.org/changeset/base/226698 Log: Put in a temporary band-aid to fix kernel builds when CC=clang, after r226665. Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk == --- head/sys/conf/kern.mk Mon Oct 24 18:29:50 2011(r226697) +++ head/sys/conf/kern.mk Mon Oct 24 18:35:16 2011(r226698) @@ -7,7 +7,7 @@ FREEBSD_GCC!= ${CC} --version | grep Fre # # Warning flags for compiling the kernel and components of the kernel: # -.if ${FREEBSD_GCC} +.if defined(FREEBSD_GCC) && ${FREEBSD_GCC} # FreeBSD extensions, not available in upstream GCC format_extensions= -fformat-extensions no_align_long_strings= -mno-align-long-strings ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r226699 - head/sys/dev/dc
Author: yongari Date: Mon Oct 24 20:26:37 2011 New Revision: 226699 URL: http://svn.freebsd.org/changeset/base/226699 Log: When driver is run for the first time there would be no established link such that calling dc_setcfg() right after media change would be meaningless unless controller in question is not Davicom DM9102. Ideally dc_setcfg() should be called when speed/duplex is resolved otherwise it would reprogram controller with wrong speed/duplex information. Because MII status change callback already calls dc_setcfg() I think calling dc_setcfg() in dc_init_locked() is wrong. For instance, it would take some time to establish a link after mii_mediachg(), so blindly calling dc_setcfg() right after mii_mediachg() will always yield wrong media configuration. Extend dc_ifmedia_upd() to handle media change and still allow 21143 and Davidcom controllers program speed/duplex regardless of current resolved speed/duplex of link. In theory 21143 may not need to call dc_setcfg() right after media change, but leave it as it is because there are too many variants to test that change. Probably dc(4) shall need a PHY reset in dc_ifmedia_upd() but it's hard to verify correctness of the change. This change reliably makes ULi M5263 establish a link. While I'm here correctly report media change result. Previously it always reported a success. Modified: head/sys/dev/dc/if_dc.c Modified: head/sys/dev/dc/if_dc.c == --- head/sys/dev/dc/if_dc.c Mon Oct 24 18:35:16 2011(r226698) +++ head/sys/dev/dc/if_dc.c Mon Oct 24 20:26:37 2011(r226699) @@ -252,6 +252,7 @@ static void dc_stop(struct dc_softc *); static void dc_watchdog(void *); static int dc_shutdown(device_t); static int dc_ifmedia_upd(struct ifnet *); +static int dc_ifmedia_upd_locked(struct dc_softc *); static void dc_ifmedia_sts(struct ifnet *, struct ifmediareq *); static int dc_dma_alloc(struct dc_softc *); @@ -3740,8 +3741,7 @@ dc_init_locked(struct dc_softc *sc) ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - mii_mediachg(mii); - dc_setcfg(sc, sc->dc_if_media); + dc_ifmedia_upd_locked(sc); /* Clear missed frames and overflow counter. */ CSR_READ_4(sc, DC_FRAMESDISCARDED); @@ -3767,25 +3767,37 @@ static int dc_ifmedia_upd(struct ifnet *ifp) { struct dc_softc *sc; - struct mii_data *mii; - struct ifmedia *ifm; + int error; sc = ifp->if_softc; - mii = device_get_softc(sc->dc_miibus); DC_LOCK(sc); - mii_mediachg(mii); - ifm = &mii->mii_media; - - if (DC_IS_INTEL(sc)) - dc_setcfg(sc, ifm->ifm_media); - else if (DC_IS_DAVICOM(sc) && - IFM_SUBTYPE(ifm->ifm_media) == IFM_HPNA_1) - dc_setcfg(sc, ifm->ifm_media); - else - sc->dc_link = 0; + error = dc_ifmedia_upd_locked(sc); DC_UNLOCK(sc); + return (error); +} - return (0); +static int +dc_ifmedia_upd_locked(struct dc_softc *sc) +{ + struct mii_data *mii; + struct ifmedia *ifm; + int error; + + DC_LOCK_ASSERT(sc); + + sc->dc_link = 0; + mii = device_get_softc(sc->dc_miibus); + error = mii_mediachg(mii); + if (error == 0) { + ifm = &mii->mii_media; + if (DC_IS_INTEL(sc)) + dc_setcfg(sc, ifm->ifm_media); + else if (DC_IS_DAVICOM(sc) && + IFM_SUBTYPE(ifm->ifm_media) == IFM_HPNA_1) + dc_setcfg(sc, ifm->ifm_media); + } + + return (error); } /* ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r226700 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: pjd Date: Mon Oct 24 20:41:31 2011 New Revision: 226700 URL: http://svn.freebsd.org/changeset/base/226700 Log: Don't forget to rename mounted snapshots of the file system being renamed. MFC after:2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.cMon Oct 24 20:26:37 2011(r226699) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.cMon Oct 24 20:41:31 2011(r226700) @@ -2437,7 +2437,7 @@ zfsvfs_update_fromname(const char *oldna continue; } if (strncmp(fromname, oldname, oldlen) == 0 && - fromname[oldlen] == '/') { + (fromname[oldlen] == '/' || fromname[oldlen] == '@')) { (void)snprintf(tmpbuf, sizeof(tmpbuf), "%s%s", newname, fromname + oldlen); (void)strlcpy(fromname, tmpbuf, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r226701 - head/sys/dev/dc
Author: yongari Date: Mon Oct 24 20:48:02 2011 New Revision: 226701 URL: http://svn.freebsd.org/changeset/base/226701 Log: Add support for ALi/ULi, now NVIDIA, M5261/M5263 PCI FastEthernet controller which is found on ULi M1563 South Bridge & M1689 Bridge. These controllers look like a tulip clone. M5263 controller does not support MII bitbang so use DC_ROM register to access MII registers. Like other tulip variants, ULi controller uses a setup frame to configure RX filter and uses new setup frame format. It's not clear to me whether the controller supports a hash based multicast filtering so this patch uses 14 perfect multicast filter to filter multicast frames. If number of multicast addresses is greater than 14, controller is put into a mode that receives all multicast frames. Due to lack of access to M5261, this change was not tested with M5261 but it probably works. Many thanks to Marco who provided remote access to M5263. Tested by:Marco Steinbach executive-computing dot de>, Martin MATO orange dot fr> Modified: head/sys/dev/dc/if_dc.c head/sys/dev/dc/if_dcreg.h Modified: head/sys/dev/dc/if_dc.c == --- head/sys/dev/dc/if_dc.c Mon Oct 24 20:41:31 2011(r226700) +++ head/sys/dev/dc/if_dc.c Mon Oct 24 20:48:02 2011(r226701) @@ -224,6 +224,10 @@ static const struct dc_type dc_devs[] = "Linksys PCMPC200 CardBus 10/100" }, { DC_DEVID(DC_VENDORID_LINKSYS, DC_DEVICEID_PCMPC200_AB09), 0, "Linksys PCMPC200 CardBus 10/100" }, + { DC_DEVID(DC_VENDORID_ULI, DC_DEVICEID_M5261), 0, + "ULi M5261 FastEthernet" }, + { DC_DEVID(DC_VENDORID_ULI, DC_DEVICEID_M5263), 0, + "ULi M5263 FastEthernet" }, { 0, 0, NULL } }; @@ -286,6 +290,7 @@ static uint32_t dc_mchash_be(const uint8 static void dc_setfilt_21143(struct dc_softc *); static void dc_setfilt_asix(struct dc_softc *); static void dc_setfilt_admtek(struct dc_softc *); +static void dc_setfilt_uli(struct dc_softc *); static void dc_setfilt_xircom(struct dc_softc *); static void dc_setfilt(struct dc_softc *); @@ -828,6 +833,23 @@ dc_miibus_readreg(device_t dev, int phy, return (0); } + if (sc->dc_type == DC_TYPE_ULI_M5263) { + CSR_WRITE_4(sc, DC_ROM, + ((phy << DC_ULI_PHY_ADDR_SHIFT) & DC_ULI_PHY_ADDR_MASK) | + ((reg << DC_ULI_PHY_REG_SHIFT) & DC_ULI_PHY_REG_MASK) | + DC_ULI_PHY_OP_READ); + for (i = 0; i < DC_TIMEOUT; i++) { + DELAY(1); + rval = CSR_READ_4(sc, DC_ROM); + if ((rval & DC_ULI_PHY_OP_DONE) != 0) { + return (rval & DC_ULI_PHY_DATA_MASK); + } + } + if (i == DC_TIMEOUT) + device_printf(dev, "phy read timed out\n"); + return (0); + } + if (DC_IS_COMET(sc)) { switch (reg) { case MII_BMCR: @@ -898,6 +920,16 @@ dc_miibus_writereg(device_t dev, int phy return (0); } + if (sc->dc_type == DC_TYPE_ULI_M5263) { + CSR_WRITE_4(sc, DC_ROM, + ((phy << DC_ULI_PHY_ADDR_SHIFT) & DC_ULI_PHY_ADDR_MASK) | + ((reg << DC_ULI_PHY_REG_SHIFT) & DC_ULI_PHY_REG_MASK) | + ((data << DC_ULI_PHY_DATA_SHIFT) & DC_ULI_PHY_DATA_MASK) | + DC_ULI_PHY_OP_WRITE); + DELAY(1); + return (0); + } + if (DC_IS_COMET(sc)) { switch (reg) { case MII_BMCR: @@ -1285,6 +1317,97 @@ dc_setfilt_asix(struct dc_softc *sc) } static void +dc_setfilt_uli(struct dc_softc *sc) +{ + uint8_t eaddr[ETHER_ADDR_LEN]; + struct ifnet *ifp; + struct ifmultiaddr *ifma; + struct dc_desc *sframe; + uint32_t filter, *sp; + uint8_t *ma; + int i, mcnt; + + ifp = sc->dc_ifp; + + i = sc->dc_cdata.dc_tx_prod; + DC_INC(sc->dc_cdata.dc_tx_prod, DC_TX_LIST_CNT); + sc->dc_cdata.dc_tx_cnt++; + sframe = &sc->dc_ldata.dc_tx_list[i]; + sp = sc->dc_cdata.dc_sbuf; + bzero(sp, DC_SFRAME_LEN); + + sframe->dc_data = htole32(DC_ADDR_LO(sc->dc_saddr)); + sframe->dc_ctl = htole32(DC_SFRAME_LEN | DC_TXCTL_SETUP | + DC_TXCTL_TLINK | DC_FILTER_PERFECT | DC_TXCTL_FINT); + + sc->dc_cdata.dc_tx_chain[i] = (struct mbuf *)sc->dc_cdata.dc_sbuf; + + /* Set station address. */ + bcopy(IF_LLADDR(sc->dc_ifp), eaddr, ETHER_ADDR_LEN); + *sp++ = DC_SP_MAC(eaddr[1] << 8 | eaddr[0]); + *sp++ = DC_SP_MAC(eaddr[3] << 8 | eaddr[2]); + *sp++ = DC_SP_MAC(eaddr[5] << 8 | eaddr[4]); + + /* Set broadcast address. */ + *sp++ = DC_SP_MAC(0xFF
svn commit: r226702 - in head: contrib/gcc gnu/usr.bin/cc
Author: obrien Date: Mon Oct 24 20:52:41 2011 New Revision: 226702 URL: http://svn.freebsd.org/changeset/base/226702 Log: * Don't give the impression that this compiler is GPLv3. (It is "well known" that GCC 4.2.2 is GPLv3.) * Don't give the impression that this compiler isn't "trustable". * Fix dependency nit. Modified: head/contrib/gcc/BASE-VER head/contrib/gcc/DEV-PHASE head/gnu/usr.bin/cc/Makefile.ver Modified: head/contrib/gcc/BASE-VER == --- head/contrib/gcc/BASE-VER Mon Oct 24 20:48:02 2011(r226701) +++ head/contrib/gcc/BASE-VER Mon Oct 24 20:52:41 2011(r226702) @@ -1 +1 @@ -4.2.2 +4.2.1 Modified: head/contrib/gcc/DEV-PHASE == --- head/contrib/gcc/DEV-PHASE Mon Oct 24 20:48:02 2011(r226701) +++ head/contrib/gcc/DEV-PHASE Mon Oct 24 20:52:41 2011(r226702) @@ -1 +1 @@ -prerelease +patched Modified: head/gnu/usr.bin/cc/Makefile.ver == --- head/gnu/usr.bin/cc/Makefile.verMon Oct 24 20:48:02 2011 (r226701) +++ head/gnu/usr.bin/cc/Makefile.verMon Oct 24 20:52:41 2011 (r226702) @@ -4,7 +4,7 @@ BASEVER!= cat ${GCCDIR}/BASE-VER DATESTAMP!=cat ${GCCDIR}/DATESTAMP DEVPHASE!= cat ${GCCDIR}/DEV-PHASE -version.o: version.c +version.o: version.c ${GCCDIR}/BASE-VER ${GCCDIR}/DATESTAMP ${GCCDIR}/DEV-PHASE ${CC} ${CFLAGS} -DBASEVER=\"${BASEVER}\" \ -DDATESTAMP=\"\ ${DATESTAMP}\" \ -DDEVPHASE=\"\ ${DEVPHASE}\" -c ${.IMPSRC} ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r226703 - head/share/man/man4
Author: yongari Date: Mon Oct 24 20:57:50 2011 New Revision: 226703 URL: http://svn.freebsd.org/changeset/base/226703 Log: Add ALi/ULi M5261/M5263 to supported hardware chipets. Modified: head/share/man/man4/dc.4 Modified: head/share/man/man4/dc.4 == --- head/share/man/man4/dc.4Mon Oct 24 20:52:41 2011(r226702) +++ head/share/man/man4/dc.4Mon Oct 24 20:57:50 2011(r226703) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 23, 2011 +.Dd October 24, 2011 .Dt DC 4 .Os .Sh NAME @@ -160,6 +160,8 @@ DEC/Intel 21143 ADMtek AL981 Comet, AN985 Centaur, ADM9511 Centaur II and ADM9513 Centaur II .It +ALi/ULi M5261 and M5263 +.It ASIX Electronics AX88140A and AX88141 .It Conexant LANfinity RS7112 (miniPCI) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r226704 - head/share/man/man4
Author: yongari Date: Mon Oct 24 21:01:20 2011 New Revision: 226704 URL: http://svn.freebsd.org/changeset/base/226704 Log: All dc(4) controllers support VLAN over-sized frame. Xr vlan Modified: head/share/man/man4/dc.4 Modified: head/share/man/man4/dc.4 == --- head/share/man/man4/dc.4Mon Oct 24 20:57:50 2011(r226703) +++ head/share/man/man4/dc.4Mon Oct 24 21:01:20 2011(r226704) @@ -347,6 +347,7 @@ the card should be configured correctly. .Xr netintro 4 , .Xr ng_ether 4 , .Xr polling 4 , +.Xr vlan 4 , .Xr eeprom 8 , .Xr ifconfig 8 .Rs ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r226705 - in head/cddl/contrib/opensolaris: cmd/zfs lib/libzfs/common
Author: pjd Date: Mon Oct 24 21:14:50 2011 New Revision: 226705 URL: http://svn.freebsd.org/changeset/base/226705 Log: Extend r226676 to allow rename without unmount even for file systems with non-legacy mountpoints. It is better to be able to rename such file systems and let them be mounted in old places until next reboot than using live CD, etc. to rename with remount. This is implemented by adding -u option to 'zfs rename'. If file system's mountpoint property is set to 'legacy' or 'none', there is no need to specify -u. Update zfs(8) manual page to reflect this addition. MFC after:2 weeks Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_changelist.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 == --- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Mon Oct 24 21:01:20 2011 (r226704) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Mon Oct 24 21:14:50 2011 (r226705) @@ -76,6 +76,11 @@ zfs \- configures ZFS file systems .LP .nf +\fBzfs\fR \fBrename\fR \fB-u\fR [\fB-p\fR] \fIfilesystem\fR \fIfilesystem\fR +.fi + +.LP +.nf \fBzfs\fR \fBlist\fR [\fB-r\fR|\fB-d\fR \fIdepth\fR][\fB-H\fR][\fB-o\fR \fIproperty\fR[,...]] [\fB-t\fR \fItype\fR[,...]] [\fB-s\fR \fIproperty\fR] ... [\fB-S\fR \fIproperty\fR] ... [\fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR] ... .fi @@ -1479,6 +1484,10 @@ The snapshot that was cloned, and any sn .na \fB\fBzfs rename\fR [\fB-p\fR] \fIfilesystem\fR|\fIvolume\fR \fIfilesystem\fR|\fIvolume\fR\fR .ad +.br +.na +\fB\fBzfs rename\fR \fB-u\fR [\fB-p\fR] \fIfilesystem\fR \fIfilesystem\fR\fR +.ad .sp .6 .RS 4n Renames the given dataset. The new target can be located anywhere in the \fBZFS\fR hierarchy, with the exception of snapshots. Snapshots can only be renamed within the parent file system or volume. When renaming a snapshot, the parent file system of the snapshot does not need to be specified as part of the second argument. Renamed file systems can inherit new mount points, in which case they are unmounted and remounted at the new mount point. @@ -1493,6 +1502,17 @@ Renames the given dataset. The new targe Creates all the nonexistent parent datasets. Datasets created in this manner are automatically mounted according to the \fBmountpoint\fR property inherited from their parent. .RE +.sp +.ne 2 +.mk +.na +\fB\fB-u\fR\fR +.ad +.sp .6 +.RS 4n +Do not remount file systems during rename. If a file system's \fBmountpoint\fR property is set to \fBlegacy\fR or \fBnone\fR, file system is not unmounted even if this option is not given. +.RE + .RE .sp Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c == --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.cMon Oct 24 21:01:20 2011(r226704) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.cMon Oct 24 21:14:50 2011(r226705) @@ -253,7 +253,8 @@ get_usage(zfs_help_t idx) return (gettext("\trename " "\n" "\trename -p \n" - "\trename -r ")); + "\trename -r \n" + "\trename -u [-p] ")); case HELP_ROLLBACK: return (gettext("\trollback [-rRf] \n")); case HELP_SEND: @@ -2851,6 +2852,7 @@ zfs_do_list(int argc, char **argv) * zfs rename * zfs rename -p * zfs rename -r + * zfs rename -u [-p] * * Renames the given dataset to another of the same type. * @@ -2861,19 +2863,21 @@ static int zfs_do_rename(int argc, char **argv) { zfs_handle_t *zhp; - int c; - int ret; - boolean_t recurse = B_FALSE; + renameflags_t flags = { 0 }; + int c, ret, types; boolean_t parents = B_FALSE; /* check options */ - while ((c = getopt(argc, argv, "pr")) != -1) { + while ((c = getopt(argc, argv, "pru")) != -1) { switch (c) { case 'p': parents = B_TRUE; break; case 'r': - recurse = B_TRUE; + flags.recurse = B_TRUE; + break; + case 'u': + flags.nounmount = B_TRUE; break; case '?': default: @@ -2902,20 +2906,32 @@ zfs_do_rename(int argc, char **argv) usage(B_FALSE); } - if (recurse && parents) { + if (flags.recurse && parents) { (void) fprintf(stderr, gettext("-p and -r options are
svn commit: r226706 - in head/cddl/contrib/opensolaris: cmd/zfs lib/libzfs/common
Author: pjd Date: Mon Oct 24 21:22:55 2011 New Revision: 226706 URL: http://svn.freebsd.org/changeset/base/226706 Log: Update copyright to include myself. MFC after:2 weeks Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_changelist.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c == --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.cMon Oct 24 21:14:50 2011(r226705) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.cMon Oct 24 21:22:55 2011(r226706) @@ -22,6 +22,8 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. + * Copyright (c) 2011 Pawel Jakub Dawidek . + * All rights reserved. */ #include Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h == --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.hMon Oct 24 21:14:50 2011(r226705) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.hMon Oct 24 21:22:55 2011(r226706) @@ -22,6 +22,8 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2010 Nexenta Systems, Inc. All rights reserved. + * Copyright (c) 2011 Pawel Jakub Dawidek . + * All rights reserved. */ #ifndef_LIBZFS_H Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_changelist.c == --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_changelist.c Mon Oct 24 21:14:50 2011(r226705) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_changelist.c Mon Oct 24 21:22:55 2011(r226706) @@ -24,6 +24,9 @@ * Use is subject to license terms. * * Portions Copyright 2007 Ramprakash Jelari + * + * Copyright (c) 2011 Pawel Jakub Dawidek . + * All rights reserved. */ #include Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c == --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.cMon Oct 24 21:14:50 2011(r226705) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.cMon Oct 24 21:22:55 2011(r226706) @@ -23,6 +23,8 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2010 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2011 Pawel Jakub Dawidek . + * All rights reserved. */ #include Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h == --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h Mon Oct 24 21:14:50 2011(r226705) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h Mon Oct 24 21:22:55 2011(r226706) @@ -21,6 +21,8 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011 Pawel Jakub Dawidek . + * All rights reserved. */ #ifndef_LIBFS_IMPL_H ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r226707 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
Author: pjd Date: Mon Oct 24 21:31:53 2011 New Revision: 226707 URL: http://svn.freebsd.org/changeset/base/226707 Log: - Use better naming now that we allow to rename any mounted file system (not only legacy). - Update copyright to include myself. MFC after:2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Mon Oct 24 21:22:55 2011(r226706) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Mon Oct 24 21:31:53 2011(r226707) @@ -21,6 +21,8 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2011 Pawel Jakub Dawidek . + * All rights reserved. */ #include Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Mon Oct 24 21:22:55 2011(r226706) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Mon Oct 24 21:31:53 2011(r226707) @@ -20,6 +20,8 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011 Pawel Jakub Dawidek . + * All rights reserved. */ #include @@ -1248,7 +1250,7 @@ would_change(dsl_dir_t *dd, int64_t delt struct renamearg { dsl_dir_t *newparent; const char *mynewname; - boolean_t islegacy; + boolean_t allowmounted; }; static int @@ -1267,10 +1269,9 @@ dsl_dir_rename_check(void *arg1, void *a * stats), but any that are present in open context will likely * be gone by syncing context, so only fail from syncing * context. -* Don't check if we are renaming dataset with mountpoint set to -* "legacy" or "none". +* Don't check if we allow renaming of busy (mounted) dataset. */ - if (!ra->islegacy && dmu_tx_is_syncing(tx) && + if (!ra->allowmounted && dmu_tx_is_syncing(tx) && dmu_buf_refcount(dd->dd_dbuf) > 1) { return (EBUSY); } @@ -1310,7 +1311,7 @@ dsl_dir_rename_sync(void *arg1, void *ar objset_t *mos = dp->dp_meta_objset; int err; - ASSERT(ra->islegacy || dmu_buf_refcount(dd->dd_dbuf) <= 2); + ASSERT(ra->allowmounted || dmu_buf_refcount(dd->dd_dbuf) <= 2); if (ra->newparent != dd->dd_parent) { dsl_dir_diduse_space(dd->dd_parent, DD_USED_CHILD, @@ -1384,7 +1385,7 @@ dsl_dir_rename(dsl_dir_t *dd, const char goto out; } - ra.islegacy = !!(flags & ZFS_RENAME_IS_LEGACY); + ra.allowmounted = !!(flags & ZFS_RENAME_ALLOW_MOUNTED); err = dsl_sync_task_do(dd->dd_pool, dsl_dir_rename_check, dsl_dir_rename_sync, dd, &ra, 3); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h Mon Oct 24 21:22:55 2011(r226706) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h Mon Oct 24 21:31:53 2011(r226707) @@ -20,6 +20,8 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011 Pawel Jakub Dawidek . + * All rights reserved. */ #ifndef_SYS_DSL_DATASET_H @@ -181,8 +183,8 @@ struct dsl_ds_holdarg { /* * Flags for dsl_dataset_rename(). */ -#defineZFS_RENAME_RECURSIVE0x01 -#defineZFS_RENAME_IS_LEGACY0x02 +#defineZFS_RENAME_RECURSIVE0x01 +#defineZFS_RENAME_ALLOW_MOUNTED0x02 #definedsl_dataset_is_snapshot(ds) \ ((ds)->ds_phys->ds_num_children != 0) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h Mon Oct 24 21:22:55 2011(r226706) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h Mon Oct 24 21:31:53 2011(r226707) @@ -20,6 +
svn commit: r226708 - head/usr.sbin/pkg_install/info
Author: delphij Date: Mon Oct 24 21:38:25 2011 New Revision: 226708 URL: http://svn.freebsd.org/changeset/base/226708 Log: Staticify elide_root() for now to fix build. Modified: head/usr.sbin/pkg_install/info/show.c Modified: head/usr.sbin/pkg_install/info/show.c == --- head/usr.sbin/pkg_install/info/show.c Mon Oct 24 21:31:53 2011 (r226707) +++ head/usr.sbin/pkg_install/info/show.c Mon Oct 24 21:38:25 2011 (r226708) @@ -207,7 +207,7 @@ show_plist(const char *title, Package *p } } -const char * +static const char * elide_root(const char *dir) { if (strcmp(dir, "/") == 0) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r226709 - head/sys/dev/usb/net
Author: yongari Date: Mon Oct 24 23:38:11 2011 New Revision: 226709 URL: http://svn.freebsd.org/changeset/base/226709 Log: This change makes it possible to define driver specific attach handler such that driver can announce interface capabilities and can do its own MII attach. Currently all USB ethernet controllers have no way to establish a link with pause capabilities. Lack of checksum offloading support also was one of reason to bring this change in. This change adds a couple of wrappers to USB ethernet drivers (uether_ifmedia_upd, uether_init and uether_start). All exported functions in uether has prefix uether_ so I think it's more consistent to have wrappers that follow the convention. This change preserves ABI/KPI so it should be safe to merge this change to stable/8. While I'm here add missing __FBSDID and clean up headers. Reviewed by: hselasky Modified: head/sys/dev/usb/net/usb_ethernet.c head/sys/dev/usb/net/usb_ethernet.h Modified: head/sys/dev/usb/net/usb_ethernet.c == --- head/sys/dev/usb/net/usb_ethernet.c Mon Oct 24 21:38:25 2011 (r226708) +++ head/sys/dev/usb/net/usb_ethernet.c Mon Oct 24 23:38:11 2011 (r226709) @@ -24,24 +24,32 @@ * SUCH DAMAGE. */ -#include -#include +#include +__FBSDID("$FreeBSD$"); + #include -#include -#include #include -#include #include -#include +#include +#include #include +#include +#include +#include #include -#include +#include +#include #include #include -#include -#include -#include -#include + +#include +#include +#include +#include +#include + +#include +#include #include #include @@ -197,42 +205,53 @@ ue_attach_post_task(struct usb_proc_msg usb_callout_init_mtx(&ue->ue_watchdog, ue->ue_mtx, 0); sysctl_ctx_init(&ue->ue_sysctl_ctx); + error = 0; ifp = if_alloc(IFT_ETHER); if (ifp == NULL) { device_printf(ue->ue_dev, "could not allocate ifnet\n"); - goto error; + goto fail; } ifp->if_softc = ue; if_initname(ifp, "ue", ue->ue_unit); - ifp->if_mtu = ETHERMTU; - ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; - if (ue->ue_methods->ue_ioctl != NULL) - ifp->if_ioctl = ue->ue_methods->ue_ioctl; - else - ifp->if_ioctl = uether_ioctl; - ifp->if_start = ue_start; - ifp->if_init = ue_init; - IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); - ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; - IFQ_SET_READY(&ifp->if_snd); - ue->ue_ifp = ifp; - - if (ue->ue_methods->ue_mii_upd != NULL && - ue->ue_methods->ue_mii_sts != NULL) { - mtx_lock(&Giant); /* device_xxx() depends on this */ - error = mii_attach(ue->ue_dev, &ue->ue_miibus, ifp, - ue_ifmedia_upd, ue->ue_methods->ue_mii_sts, - BMSR_DEFCAPMASK, MII_PHY_ANY, MII_OFFSET_ANY, 0); - mtx_unlock(&Giant); - if (error) { - device_printf(ue->ue_dev, "attaching PHYs failed\n"); - goto error; + if (ue->ue_methods->ue_attach_post_sub != NULL) { + ue->ue_ifp = ifp; + error = ue->ue_methods->ue_attach_post_sub(ue); + } else { + ifp->if_mtu = ETHERMTU; + ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; + if (ue->ue_methods->ue_ioctl != NULL) + ifp->if_ioctl = ue->ue_methods->ue_ioctl; + else + ifp->if_ioctl = uether_ioctl; + ifp->if_start = ue_start; + ifp->if_init = ue_init; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; + IFQ_SET_READY(&ifp->if_snd); + ue->ue_ifp = ifp; + + if (ue->ue_methods->ue_mii_upd != NULL && + ue->ue_methods->ue_mii_sts != NULL) { + /* device_xxx() depends on this */ + mtx_lock(&Giant); + error = mii_attach(ue->ue_dev, &ue->ue_miibus, ifp, + ue_ifmedia_upd, ue->ue_methods->ue_mii_sts, + BMSR_DEFCAPMASK, MII_PHY_ANY, MII_OFFSET_ANY, 0); + mtx_unlock(&Giant); } } + if (error) { + device_printf(ue->ue_dev, "attaching PHYs failed\n"); + goto fail; + } + if_printf(ifp, " on %s\n", device_get_nameunit(ue->ue_dev)); ether_ifattach(ifp, ue->ue_eaddr); + /* Tell upper layer we support VLAN oversized frames. */ + if (ifp->if_capabilities & IFCAP_VLAN_MTU) + ifp->if_hdrlen = sizeof(struct ether_vlan_header); snprintf(num, sizeof(nu
svn commit: r226710 - head/sys/net
Author: qingli Date: Tue Oct 25 00:34:39 2011 New Revision: 226710 URL: http://svn.freebsd.org/changeset/base/226710 Log: The host-id/interface-id can have a specific value and is properly masked out when adding a prefix route through the "route" command. However, when deleting the route, simply changing the command keyword from "add" to "delete" does not work. The failoure is observed in both IPv4 and IPv6 route insertion. The patch makes the route command behavior consistent between the "add" and the "delete" operation. MFC after:1 week Modified: head/sys/net/route.c Modified: head/sys/net/route.c == --- head/sys/net/route.cMon Oct 24 23:38:11 2011(r226709) +++ head/sys/net/route.cTue Oct 25 00:34:39 2011(r226710) @@ -1025,6 +1025,7 @@ rtrequest1_fib(int req, struct rt_addrin register struct radix_node_head *rnh; struct ifaddr *ifa; struct sockaddr *ndst; + struct sockaddr_storage mdst; #define senderr(x) { error = x ; goto bad; } KASSERT((fibnum < rt_numfibs), ("rtrequest1_fib: bad fibnum")); @@ -1051,6 +1052,10 @@ rtrequest1_fib(int req, struct rt_addrin switch (req) { case RTM_DELETE: + if (netmask) { + rt_maskedcopy(dst, (struct sockaddr *)&mdst, netmask); + dst = (struct sockaddr *)&mdst; + } #ifdef RADIX_MPATH if (rn_mpath_capable(rnh)) { error = rn_mpath_update(req, info, rnh, ret_nrt); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r226711 - head/sbin/fsck
Author: sobomax Date: Tue Oct 25 01:46:42 2011 New Revision: 226711 URL: http://svn.freebsd.org/changeset/base/226711 Log: Add new option -c to specify alternatve location of the /etc/fstab file. MFC after:1 month Modified: head/sbin/fsck/fsck.8 head/sbin/fsck/fsck.c Modified: head/sbin/fsck/fsck.8 == --- head/sbin/fsck/fsck.8 Tue Oct 25 00:34:39 2011(r226710) +++ head/sbin/fsck/fsck.8 Tue Oct 25 01:46:42 2011(r226711) @@ -41,6 +41,7 @@ .Op Fl B | F .Op Fl T Ar fstype : Ns Ar fsoptions .Op Fl t Ar fstype +.Op Fl c Ar fstab .Oo Ar special | node Oc ... .Sh DESCRIPTION The @@ -117,6 +118,10 @@ Check if the .Dq clean flag is set in the superblock and skip file system checks if file system was properly dismounted and marked clean. +.It Fl c Ar fstab +Specify the +.Pa fstab +file to use. .It Fl d Debugging mode. Just print the commands without executing them. Modified: head/sbin/fsck/fsck.c == --- head/sbin/fsck/fsck.c Tue Oct 25 00:34:39 2011(r226710) +++ head/sbin/fsck/fsck.c Tue Oct 25 01:46:42 2011(r226711) @@ -96,6 +96,7 @@ main(int argc, char *argv[]) int i, rval = 0; const char *vfstype = NULL; char globopt[3]; + const char *etc_fstab; globopt[0] = '-'; globopt[2] = '\0'; @@ -103,7 +104,8 @@ main(int argc, char *argv[]) TAILQ_INIT(&selhead); TAILQ_INIT(&opthead); - while ((i = getopt(argc, argv, "BCdvpfFnyl:t:T:")) != -1) + etc_fstab = NULL; + while ((i = getopt(argc, argv, "BCdvpfFnyl:t:T:c:")) != -1) switch (i) { case 'B': if (flags & CHECK_BACKGRD) @@ -160,6 +162,10 @@ main(int argc, char *argv[]) vfstype = optarg; break; + case 'c': + etc_fstab = optarg; + break; + case '?': default: usage(); @@ -169,6 +175,9 @@ main(int argc, char *argv[]) argc -= optind; argv += optind; + if (etc_fstab != NULL) + setfstab(etc_fstab); + if (argc == 0) return checkfstab(flags, isok, checkfs); @@ -571,7 +580,7 @@ static void usage(void) { static const char common[] = - "[-Cdfnpvy] [-B | -F] [-T fstype:fsoptions] [-t fstype]"; + "[-Cdfnpvy] [-B | -F] [-T fstype:fsoptions] [-t fstype] [-c fstab]"; (void)fprintf(stderr, "usage: %s %s [special | node] ...\n", getprogname(), common); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r226712 - head/sbin/swapon
Author: sobomax Date: Tue Oct 25 01:47:33 2011 New Revision: 226712 URL: http://svn.freebsd.org/changeset/base/226712 Log: Add new option -F to specify alternative location of the /etc/fstab file. MFC after:1 month Modified: head/sbin/swapon/swapon.8 head/sbin/swapon/swapon.c Modified: head/sbin/swapon/swapon.8 == --- head/sbin/swapon/swapon.8 Tue Oct 25 01:46:42 2011(r226711) +++ head/sbin/swapon/swapon.8 Tue Oct 25 01:47:33 2011(r226712) @@ -35,8 +35,14 @@ .Nm swapon , swapoff , swapctl .Nd "specify devices for paging and swapping" .Sh SYNOPSIS -.Nm swapon Fl aq | Ar -.Nm swapoff Fl aq | Ar +.Nm swapon +.Oo Fl F Ar fstab +.Oc +.Fl aq | Ar +.Nm swapoff +.Oo Fl F Ar fstab +.Oc +.Fl aq | Ar .Nm swapctl .Op Fl AghklmsU .Oo @@ -99,6 +105,18 @@ must move swapped pages out of the devic lead to high system loads for a period of time, depending on how much data has been swapped out to that device. .Pp +Other options supported by both +.Nm swapon +and +.Nm swapoff +are as follows: +.Bl -tag -width indent +.It Fl F Ar fstab +Specify the +.Pa fstab +file to use. +.El +.Pp The .Nm swapctl utility exists primarily for those familiar with other Modified: head/sbin/swapon/swapon.c == --- head/sbin/swapon/swapon.c Tue Oct 25 01:46:42 2011(r226711) +++ head/sbin/swapon/swapon.c Tue Oct 25 01:47:33 2011(r226712) @@ -70,6 +70,7 @@ main(int argc, char **argv) int stat; int ch, doall; int sflag = 0, lflag = 0, hflag = 0, qflag = 0; + const char *etc_fstab; if ((ptr = strrchr(argv[0], '/')) == NULL) ptr = argv[0]; @@ -80,7 +81,8 @@ main(int argc, char **argv) orig_prog = which_prog; doall = 0; - while ((ch = getopt(argc, argv, "AadghklmqsU")) != -1) { + etc_fstab = NULL; + while ((ch = getopt(argc, argv, "AadghklmqsUF:")) != -1) { switch(ch) { case 'A': if (which_prog == SWAPCTL) { @@ -132,6 +134,9 @@ main(int argc, char **argv) usage(); } break; + case 'F': + etc_fstab = optarg; + break; case '?': default: usage(); @@ -140,6 +145,8 @@ main(int argc, char **argv) argv += optind; stat = 0; + if (etc_fstab != NULL) + setfstab(etc_fstab); if (which_prog == SWAPON || which_prog == SWAPOFF) { if (doall) { while ((fsp = getfsent()) != NULL) { @@ -210,7 +217,7 @@ usage(void) switch(orig_prog) { case SWAPON: case SWAPOFF: - fprintf(stderr, "-aq | file ...\n"); + fprintf(stderr, "[-F fstab] -aq | file ...\n"); break; case SWAPCTL: fprintf(stderr, "[-AghklmsU] [-a file ... | -d file ...]\n"); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r226713 - head/sys/netinet
Author: qingli Date: Tue Oct 25 04:06:29 2011 New Revision: 226713 URL: http://svn.freebsd.org/changeset/base/226713 Log: Exclude host routes when checking for prefix coverage on multiple interfaces. A host route has a NULL mask so check for that condition. I have also been told by developers who customize the packet output path with direct manipulation of the route entry (or the outgoing interface to be specific). This patch checks for the route mask explicitly to make sure custom code will not panic. PR: kern/161805 MFC after:3 days Modified: head/sys/netinet/in.c Modified: head/sys/netinet/in.c == --- head/sys/netinet/in.c Tue Oct 25 01:47:33 2011(r226712) +++ head/sys/netinet/in.c Tue Oct 25 04:06:29 2011(r226713) @@ -1429,12 +1429,21 @@ in_lltable_rtcheck(struct ifnet *ifp, u_ * on one interface and the corresponding outgoing packet leaves * another interface. */ - if (rt->rt_ifp != ifp) { + if (!(rt->rt_flags & RTF_HOST) && rt->rt_ifp != ifp) { const char *sa, *mask, *addr, *lim; int len; - sa = (const char *)rt_key(rt); mask = (const char *)rt_mask(rt); + /* +* Just being extra cautious to avoid some custom +* code getting into trouble. +*/ + if (mask == NULL) { + RTFREE_LOCKED(rt); + return (EINVAL); + } + + sa = (const char *)rt_key(rt); addr = (const char *)l3addr; len = ((const struct sockaddr_in *)l3addr)->sin_len; lim = addr + len; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r226714 - head/usr.sbin/boot0cfg
Author: ae Date: Tue Oct 25 04:15:45 2011 New Revision: 226714 URL: http://svn.freebsd.org/changeset/base/226714 Log: Fix argument name. This fixes EINVAL when boot0cfg uses GEOM_PART' control interface. MFC after:3 days Modified: head/usr.sbin/boot0cfg/boot0cfg.c Modified: head/usr.sbin/boot0cfg/boot0cfg.c == --- head/usr.sbin/boot0cfg/boot0cfg.c Tue Oct 25 04:06:29 2011 (r226713) +++ head/usr.sbin/boot0cfg/boot0cfg.c Tue Oct 25 04:15:45 2011 (r226714) @@ -378,7 +378,7 @@ write_mbr(const char *fname, int flags, } grq = gctl_get_handle(); gctl_ro_param(grq, "class", -1, "PART"); -gctl_ro_param(grq, "geom", -1, pname); +gctl_ro_param(grq, "arg0", -1, pname); gctl_ro_param(grq, "verb", -1, "bootcode"); gctl_ro_param(grq, "bootcode", mbr_size, mbr); gctl_ro_param(grq, "flags", -1, "C"); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"