docs/175560: ugen(4) man page contains incorrect device node path

Andreas Gustafsson gson at gson.org
Thu May 15 16:33:11 UTC 2014


Hi,

gavin at FreeBSD.org wrote:
> Synopsis: ugen(4) man page contains incorrect device node path
> 
> State-Changed-From-To: open->feedback
> State-Changed-By: gavin
> State-Changed-When: Thu May 15 13:26:42 UTC 2014
> State-Changed-Why: 
> Hi, and sorry for the delay in responding to this.  The issue is that
> the endpoint ID will be a single digit for endpoints 0-9, and double
> digits for enpoint 10 and up.  I'm not sure it's worth changing the
> man page to reflect that both of these are possible, do you have any
> opinion?

I'm coming to this from NetBSD, where the endpoint number always
consists of two digits.  For example, endpoint 0 of device 0
is called /dev/ugen0.00, not /dev/ugen0.0.

When I tried to open a ugen endpoint on a FreeBSD system using the
same device path I had used on NetBSD, it failed as the device node
did not exist.  Reading the FreeBSD ugen man page then only added to
my confusion, because the pattern "/dev/ugenN.EE" in the man page
seemed to exactly match the name that did not work.

The FreeBSD ugen device and its man page are derived from the NetBSD
ones.  I'm not sure why FreeBSD is using a naming scheme incompatible
with that of NetBSD, but if this is a deliberate change, then surely
the man page should also be changed accordingly.  At a minimum, it
could be changed to simply say:

  /dev/ugenN.E   Endpoint E of device N.

Presumably N can also be larger than 9, and if a single N can denote
an multi-digit integer, so can a single E.
-- 
Andreas Gustafsson, gson at gson.org


More information about the freebsd-doc mailing list