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.
This commit is contained in:
Warner Losh 2003-04-21 18:19:08 +00:00
parent 1f96e3e8b9
commit 01a9b4348f
2 changed files with 7 additions and 0 deletions

View File

@ -1352,6 +1352,12 @@ device_is_alive(device_t dev)
return (dev->state >= DS_ALIVE);
}
int
device_is_attached(device_t dev)
{
return (dev->state >= DS_ATTACHED);
}
int
device_set_devclass(device_t dev, const char *classname)
{

View File

@ -310,6 +310,7 @@ void *device_get_softc(device_t dev);
device_state_t device_get_state(device_t dev);
int device_get_unit(device_t dev);
int device_is_alive(device_t dev); /* did probe succeed? */
int device_is_attached(device_t dev); /* did attach succeed? */
int device_is_enabled(device_t dev);
int device_is_quiet(device_t dev);
int device_print_prettyname(device_t dev);