Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

re: CVS commit: src/usr.sbin/usbdevs



Hi mrg

You wrote:
> > Look for up to 16 USB controllers, to match the number of device nodes
> > now created by MAKEDEV.
> 
> thanks for doing this.  you inspired me to get usbdevs to get the
> count from drvctl(8) if available, so next time we don't have to
> patch it again.  based upon the code in drvctl(8).
> 
> what do you think?
> 
>    https://www.netbsd.org/~mrg/usbdevs.anycount.diff

Thanks for improving on my commit.  Your patch looks correct as far
as I can see, but rather complicated for what it does.  Couldn't we
get the same end result simply by looping until opening /dev/usbN
yields ENOENT?

Or alternatively, if we do spend the effort to walk the device tree,
we should use the information gained from that to full advantage by
issuing warnings about missing /dev/usbN device nodes rather than just
silently ignoring the affected controllers.
-- 
Andreas Gustafsson, gson%NetBSD.org@localhost


Home | Main Index | Thread Index | Old Index