Skip site navigation (1)Skip section navigation (2)
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-8@freebsd.org
Subject:   svn commit: r241425 - stable/8/sys/kern
Message-ID:  <201210102127.q9ALRUiI005052@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: eadler
Date: Wed Oct 10 21:27:29 2012
New Revision: 241425
URL: http://svn.freebsd.org/changeset/base/241425

Log:
  MFC r241119:
  	Provide a generic way to disable devices at boot time
  
  PR:		kern/119202
  Approved by:	cperciva (implicit)

Modified:
  stable/8/sys/kern/subr_bus.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/kern/   (props changed)

Modified: stable/8/sys/kern/subr_bus.c
==============================================================================
--- stable/8/sys/kern/subr_bus.c	Wed Oct 10 21:21:54 2012	(r241424)
+++ stable/8/sys/kern/subr_bus.c	Wed Oct 10 21:27:29 2012	(r241425)
@@ -2759,6 +2759,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.q9ALRUiI005052>