diff options
author | jkh <jkh@FreeBSD.org> | 1995-05-26 20:31:02 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1995-05-26 20:31:02 +0000 |
commit | 9a596693ad74d8bcb1b6c3764f0be96f1198f0ac (patch) | |
tree | e5b00ce261c9035a980e2ece6294990ed10a2d5d /release/sysinstall/termcap.c | |
parent | 022b48b9827c88c7d4d9709724686de1bd2a45cf (diff) | |
download | FreeBSD-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 'release/sysinstall/termcap.c')
-rw-r--r-- | release/sysinstall/termcap.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/release/sysinstall/termcap.c b/release/sysinstall/termcap.c index ea8a38a..ef70a75 100644 --- a/release/sysinstall/termcap.c +++ b/release/sysinstall/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; |