FreeBSD supports a device.unit.disabled boot variable but this is only supported for some devices. By adding the test into the generic device probing code, it is possible to disable any device. How-To-Repeat: Code inspection.
Responsible Changed From-To: freebsd-bugs->eadler I don't see anything obviously wrong with the idea of generic disabling - but this would require some discussion; take until I could deal with it
Author: eadler Date: Tue Oct 2 03:33:41 2012 New Revision: 241119 URL: http://svn.freebsd.org/changeset/base/241119 Log: Provide a generic way to disable devices at boot time PR: kern/119202 Requested by: peterj Reviewed by: sbruno, jhb Approved by: cperciva MFC after: 1 week Modified: head/sys/kern/subr_bus.c Modified: head/sys/kern/subr_bus.c ============================================================================== --- head/sys/kern/subr_bus.c Tue Oct 2 00:30:26 2012 (r241118) +++ head/sys/kern/subr_bus.c Tue Oct 2 03:33:41 2012 (r241119) @@ -2762,6 +2762,13 @@ device_attach(device_t dev) { int error; + if (resource_disabled(dev->driver->name, dev->unit)) { + device_disable(dev); + if (bootverbose) + device_printf(dev, "disabled via hints entry\n"); + return (ENXIO); + } + device_sysctl_init(dev); if (!device_is_quiet(dev)) device_print_child(dev->parent, dev); _______________________________________________ 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-unsubscribe@freebsd.org"
State Changed From-To: open->closed Committed. Thanks!