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);
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to