summaryrefslogtreecommitdiffstats
path: root/sys/sys/bus.h
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2016-04-10 05:05:02 +0000
committerjhb <jhb@FreeBSD.org>2016-04-10 05:05:02 +0000
commit454f6ff2fd8c2ff7725a0bba51e5d2fbb562298b (patch)
treec2b9388b08aa49305211ddd368ee5ccd90961653 /sys/sys/bus.h
parent9bbe38f3d836f416727670a4ffeefa0cd12ab67f (diff)
downloadFreeBSD-src-454f6ff2fd8c2ff7725a0bba51e5d2fbb562298b.zip
FreeBSD-src-454f6ff2fd8c2ff7725a0bba51e5d2fbb562298b.tar.gz
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.
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 e0297cc..01b98f5 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);
OpenPOWER on IntegriCloud