Subject: Re: port-amiga/794: MAKEDEV doesn't build mfcs devices
To: Ty Sarna <tsarna@endicor.com>
From: Chris G Demetriou <Chris_G_Demetriou@LAGAVULIN.PDL.CS.CMU.EDU>
List: netbsd-bugs
Date: 02/11/1995 21:56:49
> tty00...tty09, then tty0a? I don't think so. Why bother with the leading
> 0 then?
so that the tty name will be 5 letters long? so that you can have 256
units (the maximum number of minor device numbers allowed with the
current device naming scheme)?
in fact, it was normal in the days of many serial ports to name things
tty[0-9a-f][0-9a-f]. You'll also note that ptys are numbered in hex.
The real naming problem is, what do you do when you have _multiple
types_ of devices providing your tty interfaces. i.e. what do you
assign as the 4th letter?
traditionally, you could have ~256 names for the the "standard" serial
ports. and then you'd have a lot of ptys, generally starting with
ttyp[0-9a-f], etc. (nowadays, i the 256 allowed ptys are
tty[p-zP-T][0-9a-f] -- note that that conflicts with ports that use
'ttyv[0-9a-f]' as "virtual terminals!)
so, that leaves
tty[g-o][0-9a-f]
tty[A-O][0-9a-f]
tty[U-Z][0-9a-f]
to be assigned.
I take it that the standard Amiga serial ports fit in the tty0? slot.
Given that people tend to interpret numbers as... numbers (rather than
as names, which they really are in the this case), even though there
probably aren't going to be 256 (or even 160) 'standard' serial ports
on an amiga, the tty[1-9]? names should probably be avoided. (i'd say
you can probably safely use tty[a-f]?, and, indeed, i believe ttye? is
already in use!)
so pick a group letter that's unused any maybe makes sense, and use
it. If you can have more than 16 ports of a type (i.e. with a given
major number), pick several letters.
It'd probably be reasonable to note what's used for what, in the
machine's MAKEDEV file and/or some of its man pages...
as for the names of callout devices: to my mind (and there are
several opinions here... mine's slightly different than sun's, i
think...) callout devices should be named cuaXX, where XX is the last
two characters of the corresponding tty device. it makes it that much
easier to figure out.
chris