summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1995-05-28 09:36:06 +0000
committerjkh <jkh@FreeBSD.org>1995-05-28 09:36:06 +0000
commit06c34bfded6c9af144bb3dbf59f196cde5845f73 (patch)
tree628a7d9dac33e3df44984a530ea17a22848e94d3
parent6c1387e54c699189309301a24f72ef6835d029ee (diff)
downloadFreeBSD-src-06c34bfded6c9af144bb3dbf59f196cde5845f73.zip
FreeBSD-src-06c34bfded6c9af144bb3dbf59f196cde5845f73.tar.gz
Try again to redirect the console back before rebooting.
-rw-r--r--release/sysinstall/system.c8
-rw-r--r--usr.sbin/sade/system.c8
-rw-r--r--usr.sbin/sysinstall/system.c8
3 files changed, 15 insertions, 9 deletions
diff --git a/release/sysinstall/system.c b/release/sysinstall/system.c
index a98d52f..11058f6 100644
--- a/release/sysinstall/system.c
+++ b/release/sysinstall/system.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: system.c,v 1.37 1995/05/26 20:31:00 jkh Exp $
+ * $Id: system.c,v 1.38 1995/05/26 21:00:43 jkh Exp $
*
* Jordan Hubbard
*
@@ -102,10 +102,12 @@ systemShutdown(void)
}
/* REALLY exit! */
if (RunningAsInit) {
- int on = 1;
+ int fd, on = 1;
/* Put the console back */
- ioctl(0, TIOCCONS, &on);
+ fd = open("/dev/ttyv0", O_RDONLY);
+ if (fd != -1)
+ ioctl(fd, TIOCCONS, &on);
reboot(RB_HALT);
}
else
diff --git a/usr.sbin/sade/system.c b/usr.sbin/sade/system.c
index a98d52f..11058f6 100644
--- a/usr.sbin/sade/system.c
+++ b/usr.sbin/sade/system.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: system.c,v 1.37 1995/05/26 20:31:00 jkh Exp $
+ * $Id: system.c,v 1.38 1995/05/26 21:00:43 jkh Exp $
*
* Jordan Hubbard
*
@@ -102,10 +102,12 @@ systemShutdown(void)
}
/* REALLY exit! */
if (RunningAsInit) {
- int on = 1;
+ int fd, on = 1;
/* Put the console back */
- ioctl(0, TIOCCONS, &on);
+ fd = open("/dev/ttyv0", O_RDONLY);
+ if (fd != -1)
+ ioctl(fd, TIOCCONS, &on);
reboot(RB_HALT);
}
else
diff --git a/usr.sbin/sysinstall/system.c b/usr.sbin/sysinstall/system.c
index a98d52f..11058f6 100644
--- a/usr.sbin/sysinstall/system.c
+++ b/usr.sbin/sysinstall/system.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: system.c,v 1.37 1995/05/26 20:31:00 jkh Exp $
+ * $Id: system.c,v 1.38 1995/05/26 21:00:43 jkh Exp $
*
* Jordan Hubbard
*
@@ -102,10 +102,12 @@ systemShutdown(void)
}
/* REALLY exit! */
if (RunningAsInit) {
- int on = 1;
+ int fd, on = 1;
/* Put the console back */
- ioctl(0, TIOCCONS, &on);
+ fd = open("/dev/ttyv0", O_RDONLY);
+ if (fd != -1)
+ ioctl(fd, TIOCCONS, &on);
reboot(RB_HALT);
}
else
OpenPOWER on IntegriCloud