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

Re: [MiNT] new ttyS names

> > > I aggree in general, but the ttyS are better numbered from 0:
> > 
> > Why?


> > People would certainly find it easier to remember which tty
> > corresponds to which port, if the numbers follow:
> > 
> >  modem1 * ttyS1      1 - 1
> >  modem2 * ttyS2      2 - 2
> > serial1 * ttyS3    odd - odd
> > serial2 * ttyS4   even - even
> >    midi * ttyS5    odd - odd
> This isn't more logical in any case.

Yes, it is.  

Real people count starting on 1, so they would tend to associate
modem1 with ttyS1 more easily than trying to remember that modem1
equals terminal 0.

> > Serial2 and LAN _are_ the same port.  You cannot access both;
> > it's either one or the other, which either way is /dev/serial2
> > in both cases.
> Yes, that's why you need two devices that can only be
> exclusivly to the other device opened.

Only if you use separate filenames.  

If the SCC A has only one entry named /dev/serial2 _OR_ /dev/lan
(depending on which one was selected by the user) and a terminal
which is always ttyS4, there can be no confusion.

> Sorry, setting this bit is task of the device driver. 

I agree, but selecting user preferences could be done using an 
environment variable that the driver parses.

Martin-Éric Racine  http://funkyware.atari.org/  Atari TT030 FAQ
Lappeenranta, Finland.  Surfing on a Intel/Microsoft-free GEM OS