From 1093963d9f5e559f8ac75340a2626c28a7ecd001 Mon Sep 17 00:00:00 2001 From: pst Date: Thu, 26 Sep 1996 21:07:11 +0000 Subject: If we're unable to open /dev/ttyv0, assume that we're on a single tty system and use /dev/console. I really think the proper test is to determine which device has been configured to be the console (remember the RB_SERIAL flag?) and use it instead of always trying to open /dev/ttyv0 first. --- usr.sbin/sade/termcap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'usr.sbin/sade/termcap.c') diff --git a/usr.sbin/sade/termcap.c b/usr.sbin/sade/termcap.c index 06aca6c..5771e5f 100644 --- a/usr.sbin/sade/termcap.c +++ b/usr.sbin/sade/termcap.c @@ -33,7 +33,6 @@ set_termcap(void) int stat; struct ttysize ts; - OnVTY = FALSE; term = getenv("TERM"); stat = ioctl(STDERR_FILENO, GIO_COLOR, &ColorDisplay); @@ -43,7 +42,7 @@ set_termcap(void) DebugFD = open("/dev/null", O_RDWR, 0); } - if (stat < 0) { + if (!OnVTY || (stat < 0)) { if (!term) { if (setenv("TERM", "vt100", 1) < 0) return -1; @@ -78,7 +77,6 @@ set_termcap(void) return -1; } } - OnVTY = TRUE; } if (ioctl(0, TIOCGSIZE, &ts) == -1) { msgDebug("Unable to get terminal size - errno %d\n", errno); -- cgit v1.1