Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* termio vs. termios (was: Re: midi player? & more)
@ 1996-02-18  0:22 David Mosberger-Tang
  0 siblings, 0 replies; 2+ messages in thread
From: David Mosberger-Tang @ 1996-02-18  0:22 UTC (permalink / raw)


OK, here is the scoop:

The OSF/1 (and System V?) version of termio interprets termio.c_cc[4]
and termio.c_cc[5] as VEOF and VEOL if ICANON is set in
termio.c_lflag.  If ICANON is not set, those fields are interpreted as
VMIN and VTIME, respectively.  What more does is get the current
termio structure, turn off ICANON (as well as making some other
changes), and then it sets the new termio structure.  Since the old
structure was gotten with ICANON set, the values in termio.c_cc[4]/[5]
are the VEOF and VEOL values but when they are set, they are
interpreted as VMIN and VTIME...  So it really is necessary to set
VMIN and VTIME in more---it's not a kernel problem (but it sure is
ugly...).

I guess the solution is to encourage everyone to use termios (that's
why less is more... :-)

	--david

PS: Here is a small patch that makes console unblanking work.  A workaround
    for an unpatched kernel is to switch to a different console, that will
    bring it back to life as well...

--- 386/drivers/char/keyboard.c	Sat Feb 17 10:31:09 1996
+++ linux/drivers/char/keyboard.c	Sat Feb 17 16:33:45 1996
@@ -35,6 +35,7 @@
 #include "kbd_kern.h"
 #include "diacr.h"
 #include "vt_kern.h"
+#include "selection.h"
 
 /*
  * On non-x86 hardware we do a full keyboard controller
@@ -1161,6 +1162,8 @@
 		if (!send_data(0xed) || !send_data(leds))
 			send_data(0xf4);	/* re-enable kbd if any errors */
 	}
+	if (console_blanked)
+		show_console();
 }
 
 int kbd_init(void)

^ permalink raw reply	[flat|nested] 2+ messages in thread
* Re: termio vs. termios (was: Re: midi player? & more)
@ 1996-02-18  9:17 David S. Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 1996-02-18  9:17 UTC (permalink / raw)


Date: 	Sat, 17 Feb 1996 17:22:32 -0700
   From: David Mosberger-Tang <davidm@azstarnet.com>

   The OSF/1 (and System V?)

This is a bsd'ism, SunOS has it too and I learned about it early on in
my syscall compat code.

   version of termio interprets termio.c_cc[4]
   and termio.c_cc[5] as VEOF and VEOL if ICANON is set in
   termio.c_lflag.  If ICANON is not set, those fields are interpreted as
   VMIN and VTIME, respectively.

Correct, and it is a load of crap...  the sgtty tty ioctl routines and
friends in char/tty_io.c need to be adjusted to understand this
bogosity.

Later,
David S. Miller
davem@caip.rutgers.edu

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1996-02-18  9:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-02-18  0:22 termio vs. termios (was: Re: midi player? &amp; more) David Mosberger-Tang
  -- strict thread matches above, loose matches on Subject: below --
1996-02-18  9:17 David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox