summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2002-09-14 19:15:12 +0000
committerimp <imp@FreeBSD.org>2002-09-14 19:15:12 +0000
commit79ce8a243fa3651af69ae1551da894135499e83b (patch)
treefdc43c422253cb35ae8bbfd4281e64b3f404adf1 /sys/kern
parent9f453489a615471851c648b9fa0bf3b8893dffc3 (diff)
downloadFreeBSD-src-79ce8a243fa3651af69ae1551da894135499e83b.zip
FreeBSD-src-79ce8a243fa3651af69ae1551da894135499e83b.tar.gz
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.
Diffstat (limited to 'sys/kern')
-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 d0b187a..fbadf0b 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);
}
OpenPOWER on IntegriCloud