diff options
author | imp <imp@FreeBSD.org> | 2003-04-21 18:19:08 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2003-04-21 18:19:08 +0000 |
commit | fb873e6edf8c193e98630c9fc95b5f025154f257 (patch) | |
tree | 7cf096390b7dc48e7b7d26edf1b7212072d31083 /sys/kern | |
parent | dfb05e513202a046f8a74897616a9c449a845d2b (diff) | |
download | FreeBSD-src-fb873e6edf8c193e98630c9fc95b5f025154f257.zip FreeBSD-src-fb873e6edf8c193e98630c9fc95b5f025154f257.tar.gz |
Create a new function, device_is_attached(), that is like
device_is_alive() that tells us if the device has successfully
attached. device_is_alive just tells us that the device has
successfully probed.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/subr_bus.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index ecb1c7a..8a68b9d 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -1353,6 +1353,12 @@ device_is_alive(device_t dev) } int +device_is_attached(device_t dev) +{ + return (dev->state >= DS_ATTACHED); +} + +int device_set_devclass(device_t dev, const char *classname) { devclass_t dc; |