diff options
author | jkh <jkh@FreeBSD.org> | 1995-05-29 00:50:05 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1995-05-29 00:50:05 +0000 |
commit | 0fe7556fa5f2f63aa0b487fe8c761f0fe2b042b2 (patch) | |
tree | 58d029010cbf3d16628a9ceed4f7834b66424740 /usr.sbin | |
parent | 3af08455beaf843caa7977ba2b77b18a1eb5c29f (diff) | |
download | FreeBSD-src-0fe7556fa5f2f63aa0b487fe8c761f0fe2b042b2.zip FreeBSD-src-0fe7556fa5f2f63aa0b487fe8c761f0fe2b042b2.tar.gz |
Shrink the boot floppy by removing all extraneous stuff. Also increase
number of inodes.
Fix various bugs reported by Poul. Implement VTY switching.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/sade/install.c | 7 | ||||
-rw-r--r-- | usr.sbin/sade/label.c | 10 | ||||
-rw-r--r-- | usr.sbin/sade/msg.c | 10 | ||||
-rw-r--r-- | usr.sbin/sade/system.c | 6 | ||||
-rw-r--r-- | usr.sbin/sysinstall/floppy.c | 4 | ||||
-rw-r--r-- | usr.sbin/sysinstall/install.c | 7 | ||||
-rw-r--r-- | usr.sbin/sysinstall/label.c | 10 | ||||
-rw-r--r-- | usr.sbin/sysinstall/msg.c | 10 | ||||
-rw-r--r-- | usr.sbin/sysinstall/system.c | 6 |
9 files changed, 38 insertions, 32 deletions
diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c index b0d276a..6f94a83 100644 --- a/usr.sbin/sade/install.c +++ b/usr.sbin/sade/install.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: install.c,v 1.64 1995/05/28 20:28:13 jkh Exp $ + * $Id: install.c,v 1.65 1995/05/28 23:12:05 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -200,6 +200,7 @@ installInitial(void) msgDebug("Sticking a potentially helpful shell over on the 4th screen\n"); if (!fork()) { int i, fd; + extern int login_tty(int); for (i = 0; i < 64; i++) close(i); @@ -207,6 +208,10 @@ installInitial(void) ioctl(0, TIOCSCTTY, &fd); dup2(0, 1); dup2(0, 2); + if (login_tty(fd)==-1) { + msgConfirm("Can't set controlling terminal"); + exit(1); + } execlp("sh", "-sh", 0); exit(1); } diff --git a/usr.sbin/sade/label.c b/usr.sbin/sade/label.c index a124cea..6e7f8e5 100644 --- a/usr.sbin/sade/label.c +++ b/usr.sbin/sade/label.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: label.c,v 1.28 1995/05/28 20:28:15 jkh Exp $ + * $Id: label.c,v 1.29 1995/05/28 23:12:06 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -348,11 +348,9 @@ print_label_chunks(void) } memcpy(onestr + PART_PART_COL, label_chunk_info[i].c->name, strlen(label_chunk_info[i].c->name)); /* If it's a filesystem, display the mountpoint */ - if (label_chunk_info[i].type == PART_FILESYSTEM || label_chunk_info[i].type == PART_FAT) { - if (label_chunk_info[i].c->private != NULL) - mountpoint = ((PartInfo *)label_chunk_info[i].c->private)->mountpoint; - else - mountpoint = " "; + if (label_chunk_info[i].c->private + && (label_chunk_info[i].type == PART_FILESYSTEM || label_chunk_info[i].type == PART_FAT)) { + mountpoint = ((PartInfo *)label_chunk_info[i].c->private)->mountpoint; if (label_chunk_info[i].type == PART_FAT) newfs = "DOS"; else diff --git a/usr.sbin/sade/msg.c b/usr.sbin/sade/msg.c index a90c50f..3459e7e 100644 --- a/usr.sbin/sade/msg.c +++ b/usr.sbin/sade/msg.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: msg.c,v 1.23 1995/05/23 02:41:15 jkh Exp $ + * $Id: msg.c,v 1.24 1995/05/24 09:00:56 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -43,6 +43,8 @@ #include "sysinstall.h" #include <stdarg.h> +#include <sys/ioctl.h> +#include <machine/console.h> #define VTY_STATLINE 24 #define TTY_STATLINE 23 @@ -205,7 +207,7 @@ msgConfirm(char *fmt, ...) use_helpfile(NULL); w = dupwin(newscr); if (OnVTY) { - msgDebug("User confirmation requested (type ALT-F1)\n"); + ioctl(0, VT_RELDISP, 0); /* Switch back */ msgInfo(NULL); } dialog_notify(errstr); @@ -251,7 +253,7 @@ msgYesNo(char *fmt, ...) use_helpfile(NULL); w = dupwin(newscr); if (OnVTY) { - msgDebug("User decision requested (type ALT-F1)\n"); + ioctl(0, VT_RELDISP, 0); /* Switch back */ msgInfo(NULL); } ret = dialog_yesno("User Confirmation Requested", errstr, -1, -1); @@ -284,7 +286,7 @@ msgGetInput(char *buf, char *fmt, ...) input_buffer[0] = '\0'; w = dupwin(newscr); if (OnVTY) { - msgDebug("User input requested (type ALT-F1)\n"); + ioctl(0, VT_RELDISP, 0); /* Switch back */ msgInfo(NULL); } rval = dialog_inputbox("Value Required", errstr, -1, -1, input_buffer); diff --git a/usr.sbin/sade/system.c b/usr.sbin/sade/system.c index 11058f6..3c25cc3 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.38 1995/05/26 21:00:43 jkh Exp $ + * $Id: system.c,v 1.39 1995/05/28 09:36:06 jkh Exp $ * * Jordan Hubbard * @@ -105,9 +105,7 @@ systemShutdown(void) int fd, on = 1; /* Put the console back */ - fd = open("/dev/ttyv0", O_RDONLY); - if (fd != -1) - ioctl(fd, TIOCCONS, &on); + ioctl(0, VT_RELDISP, 1); reboot(RB_HALT); } else diff --git a/usr.sbin/sysinstall/floppy.c b/usr.sbin/sysinstall/floppy.c index 1f97bc7..229b630 100644 --- a/usr.sbin/sysinstall/floppy.c +++ b/usr.sbin/sysinstall/floppy.c @@ -4,7 +4,7 @@ * This is probably the last attempt in the `sysinstall' line, the next * generation being slated to essentially a complete rewrite. * - * $Id: floppy.c,v 1.2 1995/05/27 23:39:29 phk Exp $ + * $Id: floppy.c,v 1.3 1995/05/28 03:04:56 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -150,7 +150,7 @@ void mediaShutdownFloppy(Device *dev) { if (floppyMounted) { - if (vsystem("umount /mnt") != 0) + if (unmount("/mnt", 0) != 0) msgDebug("Umount of floppy on /mnt failed: %s (%d)\n", strerror(errno), errno); else { floppyMounted = FALSE; diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c index b0d276a..6f94a83 100644 --- a/usr.sbin/sysinstall/install.c +++ b/usr.sbin/sysinstall/install.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: install.c,v 1.64 1995/05/28 20:28:13 jkh Exp $ + * $Id: install.c,v 1.65 1995/05/28 23:12:05 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -200,6 +200,7 @@ installInitial(void) msgDebug("Sticking a potentially helpful shell over on the 4th screen\n"); if (!fork()) { int i, fd; + extern int login_tty(int); for (i = 0; i < 64; i++) close(i); @@ -207,6 +208,10 @@ installInitial(void) ioctl(0, TIOCSCTTY, &fd); dup2(0, 1); dup2(0, 2); + if (login_tty(fd)==-1) { + msgConfirm("Can't set controlling terminal"); + exit(1); + } execlp("sh", "-sh", 0); exit(1); } diff --git a/usr.sbin/sysinstall/label.c b/usr.sbin/sysinstall/label.c index a124cea..6e7f8e5 100644 --- a/usr.sbin/sysinstall/label.c +++ b/usr.sbin/sysinstall/label.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: label.c,v 1.28 1995/05/28 20:28:15 jkh Exp $ + * $Id: label.c,v 1.29 1995/05/28 23:12:06 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -348,11 +348,9 @@ print_label_chunks(void) } memcpy(onestr + PART_PART_COL, label_chunk_info[i].c->name, strlen(label_chunk_info[i].c->name)); /* If it's a filesystem, display the mountpoint */ - if (label_chunk_info[i].type == PART_FILESYSTEM || label_chunk_info[i].type == PART_FAT) { - if (label_chunk_info[i].c->private != NULL) - mountpoint = ((PartInfo *)label_chunk_info[i].c->private)->mountpoint; - else - mountpoint = " "; + if (label_chunk_info[i].c->private + && (label_chunk_info[i].type == PART_FILESYSTEM || label_chunk_info[i].type == PART_FAT)) { + mountpoint = ((PartInfo *)label_chunk_info[i].c->private)->mountpoint; if (label_chunk_info[i].type == PART_FAT) newfs = "DOS"; else diff --git a/usr.sbin/sysinstall/msg.c b/usr.sbin/sysinstall/msg.c index a90c50f..3459e7e 100644 --- a/usr.sbin/sysinstall/msg.c +++ b/usr.sbin/sysinstall/msg.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: msg.c,v 1.23 1995/05/23 02:41:15 jkh Exp $ + * $Id: msg.c,v 1.24 1995/05/24 09:00:56 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -43,6 +43,8 @@ #include "sysinstall.h" #include <stdarg.h> +#include <sys/ioctl.h> +#include <machine/console.h> #define VTY_STATLINE 24 #define TTY_STATLINE 23 @@ -205,7 +207,7 @@ msgConfirm(char *fmt, ...) use_helpfile(NULL); w = dupwin(newscr); if (OnVTY) { - msgDebug("User confirmation requested (type ALT-F1)\n"); + ioctl(0, VT_RELDISP, 0); /* Switch back */ msgInfo(NULL); } dialog_notify(errstr); @@ -251,7 +253,7 @@ msgYesNo(char *fmt, ...) use_helpfile(NULL); w = dupwin(newscr); if (OnVTY) { - msgDebug("User decision requested (type ALT-F1)\n"); + ioctl(0, VT_RELDISP, 0); /* Switch back */ msgInfo(NULL); } ret = dialog_yesno("User Confirmation Requested", errstr, -1, -1); @@ -284,7 +286,7 @@ msgGetInput(char *buf, char *fmt, ...) input_buffer[0] = '\0'; w = dupwin(newscr); if (OnVTY) { - msgDebug("User input requested (type ALT-F1)\n"); + ioctl(0, VT_RELDISP, 0); /* Switch back */ msgInfo(NULL); } rval = dialog_inputbox("Value Required", errstr, -1, -1, input_buffer); diff --git a/usr.sbin/sysinstall/system.c b/usr.sbin/sysinstall/system.c index 11058f6..3c25cc3 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.38 1995/05/26 21:00:43 jkh Exp $ + * $Id: system.c,v 1.39 1995/05/28 09:36:06 jkh Exp $ * * Jordan Hubbard * @@ -105,9 +105,7 @@ systemShutdown(void) int fd, on = 1; /* Put the console back */ - fd = open("/dev/ttyv0", O_RDONLY); - if (fd != -1) - ioctl(fd, TIOCCONS, &on); + ioctl(0, VT_RELDISP, 1); reboot(RB_HALT); } else |