Re: Serial Patch

Richard B. Johnson (root@analogic.com)
Sat, 14 Dec 1996 22:15:24 -0500 (EST)


On Fri, 13 Dec 1996, Ion Badulescu wrote:

>
> On Fri, 13 Dec 1996, Richard B. Johnson wrote:
>
> > /*
> >
> > I installed the latest tty patch. The call to open a non-existant
> > terminal device no longer crashes. However, it now returns a valid
> > handle even if the device does not exist. In this example, there
> > are only TWO RS-232C ports on this machine! An attempt to open
> > /dev/cua3 should return with -1 and the error set to something appropriate.
>
> Try 2.0.27 - it does exactly the same thing.
>
>
> Ionut
>
Is it the correct behavior to return a valid handle on a non-existant device?
I don't think so. Looking at the base address of the other possible UARTS
show that a read returns 0xff. Looking at the ISR offset, a read also shows
0xff. The initialization code should, therefore, understand that there is no
device at this address (I hope).

Cheers,
Dick Johnson
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Richard B. Johnson
Project Engineer
Analogic Corporation
Voice : (508) 977-3000 ext. 3754
Fax : (508) 532-6097
Modem : (508) 977-6870
Ftp : ftp@boneserver.analogic.com
Email : rjohnson@analogic.com, johnson@analogic.com
Penguin : Linux version 2.1.15 on an i586 machine.
Warning : It's hard to remain at the trailing edge of technology.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-