[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: modm0dev and stty/mintnet
- Subject: Re: modm0dev and stty/mintnet
- From: Juergen Lock <nox@jelal.north.de>
- Date: Mon, 3 Oct 1994 19:57:20 +0200 (CET)
In article <199409301859.TAA07880@topo.matups.fr> you write:
>Ulrich Kuehn wrote:
>
>> I used the stty supplied with modm0dev and I got my opinion from the
>> trace output of mint, where the cua_ioctl function printed something
>> like 0x5402 invalid mode
>
>This is normal. This message is printed by modm0dev itself.
>
>> and I could not set the tty to raw mode, in fact, I could not even set any
>> of the flags besides the baud rate.
>
>...but this isn't. The Fcntl() call itself should succeed. I suggest you
>have a closer look to dosfile.c: if, for some ioctl, the device driver
>returns EINVFN (this is the case here) and the device is a tty (also the
>case), Fcntl() will fallback to tty_ioctl() which will do the Right
>Thing. Of course, this is some kind of "internal interface" of MiNT, so
>one cannot guarantee that it'll work with all the patched 1.11 versions
>floating around,
it should.
> but in ERS' latest sources, it still seems to work that
>way. Note also that all bios devices are implemented like this; you just
>need to provide the low-level ioctl's, but certainly not TIOC[GS]ETP.
>
>It is also possible that the flags are reset when you close the device.
>I don't remember such a thing, however...
not when you close but at the next (first) open... actually there
was a bug in the HPCL stuff that prevented this when > 1 processes
reopen a tty thats still in the process of hanging up:
Index: dosfile.c
@@ -270,10 +270,10 @@
extern struct tty default_tty; /* in tty.c */
tty = (struct tty *)f->devinfo;
- tty->use_cnt++;
while (tty->hup_ospeed && !creating) {
sleep (IO_Q, (long)&tty->state);
}
+ tty->use_cnt++;
/* first open for this device (not counting set_auxhandle)? */
if ((!tty->pgrp && tty->use_cnt-tty->aux_cnt <= 1) ||
tty->use_cnt <= 1) {
>
>Thierry.
all the best
Juergen