Subject: how to process /dev/ugen0.xx instances in code expecting
To: None <current-users@netbsd.org>
From: George Michaelson <ggm@apnic.net>
List: current-users
Date: 08/26/2005 12:10:48
I have some code off the net (openct, handler for USB security
tokens/smartcards) which is partially ported to BSD, but expects
the /dev/ugen device to be a simple name like /dev/ugen0 or /dev/ugen1)

current has /dev/ugen0.00 .. /dev/ugen0.10 instances. I doesn't appear
to have the unqualified /dev/ugen0 any more.

How do I know which sub-number instance is the right one to use, in a
symlink to /dev/ugen0 (or better yet.. how to I walk them to find the
right instance and not depend on the symlink?)

Is this intuitable from the result of a usbdevs command? It shows:

addr 1: UHCI root hub, Intel
 addr 2: iKey 2032, Rainbow Technologies

dmesg shows:

$ dmesg | grep ugen
ugen0 at uhub1 port 1
ugen0: Rainbow Technologies iKey 2032, rev 1.00/1.00, addr 2
$

cheers

	-George