Date: Wed, 10 Oct 2012 21:27:30 +0000 (UTC) From: Eitan Adler <eadler@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241426 - stable/9/sys/kern Message-ID: <201210102127.q9ALRUdq005066@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: eadler Date: Wed Oct 10 21:27:30 2012 New Revision: 241426 URL: http://svn.freebsd.org/changeset/base/241426 Log: MFC r241119: Provide a generic way to disable devices at boot time PR: kern/119202 Approved by: cperciva (implicit) Modified: stable/9/sys/kern/subr_bus.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/subr_bus.c ============================================================================== --- stable/9/sys/kern/subr_bus.c Wed Oct 10 21:27:29 2012 (r241425) +++ stable/9/sys/kern/subr_bus.c Wed Oct 10 21:27:30 2012 (r241426) @@ -2752,6 +2752,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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210102127.q9ALRUdq005066>