From bed807193b55ce4713638e12b547005ec8bab90a Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Sat, 14 Sep 2002 19:15:12 +0000 Subject: 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. --- sys/kern/subr_bus.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sys/kern/subr_bus.c') 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); } -- cgit v1.2.3