summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sade/termcap.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1995-05-26 20:31:02 +0000
committerjkh <jkh@FreeBSD.org>1995-05-26 20:31:02 +0000
commit9a596693ad74d8bcb1b6c3764f0be96f1198f0ac (patch)
treee5b00ce261c9035a980e2ece6294990ed10a2d5d /usr.sbin/sade/termcap.c
parent022b48b9827c88c7d4d9709724686de1bd2a45cf (diff)
downloadFreeBSD-src-9a596693ad74d8bcb1b6c3764f0be96f1198f0ac.zip
FreeBSD-src-9a596693ad74d8bcb1b6c3764f0be96f1198f0ac.tar.gz
Ask name of "other" ftp site in correct place.
Make TIOCCONS redirection for console messages work properly; we no longer open /dev/console for all I/O - we use the VTYs directly.
Diffstat (limited to 'usr.sbin/sade/termcap.c')
-rw-r--r--usr.sbin/sade/termcap.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/usr.sbin/sade/termcap.c b/usr.sbin/sade/termcap.c
index ea8a38a..ef70a75 100644
--- a/usr.sbin/sade/termcap.c
+++ b/usr.sbin/sade/termcap.c
@@ -32,8 +32,16 @@ set_termcap(void)
OnVTY = OnSerial = FALSE;
if (getpid() != 1)
DebugFD = open("sysinstall.debug", O_WRONLY|O_CREAT|O_TRUNC, 0644);
- else
+ else {
+ int i, on;
+
+ DebugFD = open("/dev/ttyv1", O_WRONLY);
+ on = 1;
+ i = ioctl(DebugFD, TIOCCONS, (char *)&on);
+ msgDebug("ioctl(%d, TIOCCONS, NULL) = %d (%s)\n", DebugFD, i, !i ? "success" : strerror(errno));
RunningAsInit = TRUE;
+ OnVTY = TRUE;
+ }
term = getenv("TERM");
stat = ioctl(STDERR_FILENO, GIO_COLOR, &ColorDisplay);
if (stat < 0) {
@@ -64,13 +72,6 @@ set_termcap(void)
return -1;
}
}
- if (DebugFD == -1) {
- int i;
-
- DebugFD = open("/dev/ttyv1", O_WRONLY);
- i = ioctl(DebugFD, TIOCCONS, (char *)NULL);
- msgDebug("ioctl(%d, TIOCCONS, NULL) = %d (%s)", DebugFD, i, !i ? "success" : strerror(errno));
- }
OnVTY = TRUE;
}
return 0;
OpenPOWER on IntegriCloud