diff options
author | John Baldwin <jhb@FreeBSD.org> | 2003-07-02 16:01:38 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2003-07-02 16:01:38 +0000 |
commit | 6591b310403469e94313efd7659f95f747192712 (patch) | |
tree | c41ae7e0b724b9b46a22f66ebca87ec6a645403f /sys/kern/subr_hints.c | |
parent | 98c3b7810be7cc90496c01d13f078d7964f7dcde (diff) | |
download | src-test2-6591b310403469e94313efd7659f95f747192712.tar.gz src-test2-6591b310403469e94313efd7659f95f747192712.zip |
Notes
Diffstat (limited to 'sys/kern/subr_hints.c')
-rw-r--r-- | sys/kern/subr_hints.c | 14 |
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); +} |