summaryrefslogtreecommitdiff
path: root/sys/kern/subr_hints.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2003-07-02 16:01:38 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2003-07-02 16:01:38 +0000
commit6591b310403469e94313efd7659f95f747192712 (patch)
treec41ae7e0b724b9b46a22f66ebca87ec6a645403f /sys/kern/subr_hints.c
parent98c3b7810be7cc90496c01d13f078d7964f7dcde (diff)
downloadsrc-test2-6591b310403469e94313efd7659f95f747192712.tar.gz
src-test2-6591b310403469e94313efd7659f95f747192712.zip
Notes
Diffstat (limited to 'sys/kern/subr_hints.c')
-rw-r--r--sys/kern/subr_hints.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/kern/subr_hints.c b/sys/kern/subr_hints.c
index 93a1391bddab..0aeb55394999 100644
--- a/sys/kern/subr_hints.c
+++ b/sys/kern/subr_hints.c
@@ -365,3 +365,17 @@ resource_find_dev(int *anchor, const char *name, int *unit,
*anchor = newln;
return ret;
}
+
+/*
+ * Check to see if a device is disabled via a disabled hint.
+ */
+int
+resource_disabled(const char *name, int unit)
+{
+ int error, value;
+
+ error = resource_int_value(name, unit, "disabled", &value);
+ if (error)
+ return (0);
+ return (value);
+}