summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2002-10-07 07:08:00 +0000
committerimp <imp@FreeBSD.org>2002-10-07 07:08:00 +0000
commitf6845196683cdfa0fe2a39c32bd9360840cb21a4 (patch)
tree61141cd92df9628920fd948384f0ea9e798aff2a /sys/kern
parentcead6168fbe677fe2c460efbae7c7977cae08e49 (diff)
downloadFreeBSD-src-f6845196683cdfa0fe2a39c32bd9360840cb21a4.zip
FreeBSD-src-f6845196683cdfa0fe2a39c32bd9360840cb21a4.tar.gz
Add wrappers around the newly created bus_child_pnpinfo_str and
bus_child_location_str.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/subr_bus.c30
1 files changed, 28 insertions, 2 deletions
diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c
index 4ccb30c..6390028 100644
--- a/sys/kern/subr_bus.c
+++ b/sys/kern/subr_bus.c
@@ -1785,9 +1785,35 @@ bus_delete_resource(device_t dev, int type, int rid)
}
int
-bus_child_present(device_t dev)
+bus_child_present(device_t child)
{
- return (BUS_CHILD_PRESENT(device_get_parent(dev), dev));
+ return (BUS_CHILD_PRESENT(device_get_parent(child), child));
+}
+
+int
+bus_child_pnpinfo_str(device_t child, char *buf, size_t buflen)
+{
+ device_t parent;
+
+ parent = device_get_parent(child);
+ if (parent == NULL) {
+ *buf = '\0';
+ return (0);
+ }
+ return (BUS_CHILD_PNPINFO_STR(parent, child, buf, buflen));
+}
+
+int
+bus_child_location_str(device_t child, char *buf, size_t buflen)
+{
+ device_t parent;
+
+ parent = device_get_parent(child);
+ if (parent == NULL) {
+ *buf = '\0';
+ return (0);
+ }
+ return (BUS_CHILD_LOCATION_STR(parent, child, buf, buflen));
}
static int
OpenPOWER on IntegriCloud