aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/bus.h
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2016-04-10 05:05:02 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2016-04-10 05:05:02 +0000
commit70e22add96ff6317d002cd62250ae83b9a3073a2 (patch)
treec2b9388b08aa49305211ddd368ee5ccd90961653 /sys/sys/bus.h
parentb4fb3d6e022db6d67407756959bc3bdeaf836d59 (diff)
downloadsrc-70e22add96ff6317d002cd62250ae83b9a3073a2.tar.gz
src-70e22add96ff6317d002cd62250ae83b9a3073a2.zip
Add a function to lookup a device_t object by name.
This just walks the global list of devices looking for one with the requested name. The one use case outside of devctl2's implementation is for DDB commands that wish to lookup devices by name.
Notes
Notes: svn path=/head/; revision=297776
Diffstat (limited to 'sys/sys/bus.h')
-rw-r--r--sys/sys/bus.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/sys/bus.h b/sys/sys/bus.h
index e0297cc45801..01b98f5e18e9 100644
--- a/sys/sys/bus.h
+++ b/sys/sys/bus.h
@@ -524,6 +524,7 @@ int device_is_attached(device_t dev); /* did attach succeed? */
int device_is_enabled(device_t dev);
int device_is_suspended(device_t dev);
int device_is_quiet(device_t dev);
+device_t device_lookup_by_name(const char *name);
int device_print_prettyname(device_t dev);
int device_printf(device_t dev, const char *, ...) __printflike(2, 3);
int device_probe(device_t dev);