Questions about the USB HID device drivers

Apollo D. Sharpe, Sr. demetrioussharpe at netscape.net
Mon Feb 18 23:28:48 UTC 2019


On 2/18/19 3:18 PM, Warner Losh wrote:
> Yes and no. If the unique prefix has / in it, devfs puts it in a subdir.

If I'm reading the code right, the unique prefix is basically 
driver_t::name. Is that correct? If so, I haven't seen a device name (in 
the entire tree) that has "/" in it's device name. Maybe I'm missing 
something here.


> Way back in the days of yore, it was 100% userland to create the 
> hierarchy. You did your mknod and that was that. We had big tables of 
> major numbers that mapped device names to the kernel.
>
> There were problems with this: not the least was that major numbers 
> were a limited resource and soon ran out. Now, devfs manages 
> everything. You can get it to create many different hierarchies. see 
> devfs(8) for details.
>
I can imagine how much of a pain that was. Though, it looks as though 
not too many people bother changing beyond the default devfs.rules and 
devfs.conf files -they also seem to be a pain to deal with. It's a 
reasonable solution for servers, however it would be much more valuable 
on desktops to have /dev/input/* for various input devices. I guess I'm 
going to have to figure out how to make devices publish themselves in 
/dev based on their primary function.

Thank you, and everyone else, for taking the time to explain the setup 
to me.

-- 
Regards,

Apollo D. Sharpe, Sr.



More information about the freebsd-usb mailing list