Module Name:    src
Committed By:   jmcneill
Date:           Sat Aug 21 17:08:15 UTC 2010

Modified Files:
        src/sys/dev/isa: isa.c

Log Message:
If the 'no-legacy-devices' property is present and true, skip device
enumeration.


To generate a diff of this commit:
cvs rdiff -u -r1.137 -r1.138 src/sys/dev/isa/isa.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/isa/isa.c
diff -u src/sys/dev/isa/isa.c:1.137 src/sys/dev/isa/isa.c:1.138
--- src/sys/dev/isa/isa.c:1.137	Wed Aug 19 16:23:28 2009
+++ src/sys/dev/isa/isa.c	Sat Aug 21 17:08:15 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: isa.c,v 1.137 2009/08/19 16:23:28 cegger Exp $	*/
+/*	$NetBSD: isa.c,v 1.138 2010/08/21 17:08:15 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2001, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isa.c,v 1.137 2009/08/19 16:23:28 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isa.c,v 1.138 2010/08/21 17:08:15 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -162,7 +162,16 @@
 int
 isarescan(device_t self, const char *ifattr, const int *locators)
 {
+	prop_dictionary_t dict;
 	int locs[ISACF_NLOCS];
+	bool no_legacy_devices = false;
+
+	dict = device_properties(self);
+	if (prop_dictionary_get_bool(dict, "no-legacy-devices",
+	    &no_legacy_devices) == true) {
+		aprint_debug_dev(self, "platform reports no legacy devices\n");
+		return 0;
+	}
 
 	memcpy(locs, locators, sizeof(locs));
 

Reply via email to