I have an application where I want to watch USB devices come and go. I've written code basd on usb(4), and it works - but the devices in question are disks, which show up as, for example,
umass0: using SCSI over Bulk-Only scsibus1 at umass0: 2 targets, 1 lun per target sd0 at scsibus1 target 0 lun 0: <Generic, External, 2.10> disk fixed So, I'm wondering if there's some way to watch devices come and go beyond what /dev/usb gives me (which stops with the umass attachment). Even some way to inspect the current device tree would help; I can watch umass attach and then query the tree to see what's underneath it. I have a fuzzy memory of seeing something that looked like device-tree data, but the memory's too fuzzy to be of much use here. kern.drivers appears to be part of what I'd want, but only part; I'd much rather not have to scrape dmesg output. :/ The machine in question is currently at 4.0.1. If this is possible with a more recent version but not with 4.0.1, I might be able to talk its admins into switching, but I suspect they'd rather not; it _is_ a production machine. /~\ The ASCII Mouse \ / Ribbon Campaign X Against HTML mo...@rodents-montreal.org / \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B