aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/subr_bus.c
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2002-09-14 19:15:12 +0000
committerWarner Losh <imp@FreeBSD.org>2002-09-14 19:15:12 +0000
commitbed807193b55ce4713638e12b547005ec8bab90a (patch)
treefdc43c422253cb35ae8bbfd4281e64b3f404adf1 /sys/kern/subr_bus.c
parent2f11d560ccc172691ed0e4e4c3d338c0f7e4d769 (diff)
downloadsrc-bed807193b55ce4713638e12b547005ec8bab90a.tar.gz
src-bed807193b55ce4713638e12b547005ec8bab90a.zip
Add additional information returned to userland by the device querying
functions. We add pnpinfo, locationinfo, devflags (the newbus flags on the device), flags (the flags that device_get_flags returns) and state to the list of things we return. pnpinfo and locationinfo are place holders at the moment that will be filled in by the device's parent (optionally). Userland programs will likely use this information from time to time and take appropriate actions. Improvements to devinfo to follow.
Notes
Notes: svn path=/head/; revision=103329
Diffstat (limited to 'sys/kern/subr_bus.c')
-rw-r--r--sys/kern/subr_bus.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c
index d0b187a449de..fbadf0b76487 100644
--- a/sys/kern/subr_bus.c
+++ b/sys/kern/subr_bus.c
@@ -2097,6 +2097,11 @@ sysctl_devices(SYSCTL_HANDLER_ARGS)
} else {
snprintf(udev.dv_drivername, 32, "%s", dev->driver->name);
}
+ udev.dv_pnpinfo[0] = 0;
+ udev.dv_location[0] = 0;
+ udev.dv_devflags = dev->devflags;
+ udev.dv_flags = dev->flags;
+ udev.dv_state = dev->state;
error = SYSCTL_OUT(req, &udev, sizeof(udev));
return (error);
}