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
This commit is contained in:
Eitan Adler 2012-10-02 03:33:41 +00:00
parent 8e0079a07a
commit 8dbce2a343

View file

@ -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);