diff options
author | jkh <jkh@FreeBSD.org> | 1995-10-19 18:37:50 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1995-10-19 18:37:50 +0000 |
commit | 6d13f9a708f62766aa05501fc6b9b931ff1e726f (patch) | |
tree | cfc1793e8a4897a5fcec15084ce9fe55cbb6545b | |
parent | 45cf2943d04dcb0b87c6372e28b812ce8e6dee59 (diff) | |
download | FreeBSD-src-6d13f9a708f62766aa05501fc6b9b931ff1e726f.zip FreeBSD-src-6d13f9a708f62766aa05501fc6b9b931ff1e726f.tar.gz |
Sync.
-rw-r--r-- | release/sysinstall/installUpgrade.c | 15 | ||||
-rw-r--r-- | release/sysinstall/options.c | 38 | ||||
-rw-r--r-- | usr.sbin/sysinstall/installUpgrade.c | 15 | ||||
-rw-r--r-- | usr.sbin/sysinstall/options.c | 38 |
4 files changed, 78 insertions, 28 deletions
diff --git a/release/sysinstall/installUpgrade.c b/release/sysinstall/installUpgrade.c index 15dfddf..8d56032 100644 --- a/release/sysinstall/installUpgrade.c +++ b/release/sysinstall/installUpgrade.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.71.2.38 1995/10/18 05:01:55 jkh Exp $ + * $Id: installUpgrade.c,v 1.1 1995/10/19 16:15:40 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -320,20 +320,11 @@ installUpgrade(char *str) if (!(child = fork())) { int i, fd; struct termios foo; - extern int login_tty(int); - for (i = 0; i < 3; i++) - close(i); - fd = open("/dev/ttyv0", O_RDWR); - ioctl(0, TIOCSCTTY, &fd); - dup2(0, 1); - dup2(0, 2); - if (login_tty(fd) == -1) - msgDebug("Can't set the controlling terminal.\n"); signal(SIGTTOU, SIG_IGN); - if (tcgetattr(fd, &foo) != -1) { + if (tcgetattr(0, &foo) != -1) { foo.c_cc[VERASE] = '\010'; - if (tcsetattr(fd, TCSANOW, &foo) == -1) + if (tcsetattr(0, TCSANOW, &foo) == -1) msgDebug("Unable to set the erase character.\n"); } else diff --git a/release/sysinstall/options.c b/release/sysinstall/options.c index 0127afe..28eadd5 100644 --- a/release/sysinstall/options.c +++ b/release/sysinstall/options.c @@ -4,7 +4,7 @@ * This is probably the last attempt in the `sysinstall' line, the next * generation being slated for what's essentially a complete rewrite. * - * $Id: options.c,v 1.13 1995/10/18 05:01:59 jkh Exp $ + * $Id: options.c,v 1.14 1995/10/19 15:55:20 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -70,6 +70,37 @@ resetLogo(char *str) return "[WHAP!]"; } +static char * +mediaCheck(Option opt) +{ + if (mediaDevice) { + switch(mediaDevice->type) { + case DEVICE_TYPE_UFS: + case DEVICE_TYPE_DISK: + return "File system"; + + case DEVICE_TYPE_FLOPPY: + return "Floppy"; + + case DEVICE_TYPE_FTP: + return "FTP"; + + case DEVICE_TYPE_CDROM: + return "CDROM"; + + case DEVICE_TYPE_TAPE: + return "Tape"; + + case DEVICE_TYPE_DOS: + return "DOS"; + + case DEVICE_TYPE_NFS: + return "NFS"; + } + } + return "<unset>"; +} + static Option Options[] = { { "NFS Secure", "NFS server talks only on a secure port", OPT_IS_FLAG, &OptFlags, (void *)OPT_NFS_SECURE, NULL }, @@ -97,6 +128,8 @@ static Option Options[] = { OPT_IS_VAR, "Please specify a full pathname to the HTML browser binary:", BROWSER_BINARY, varCheck }, { "Config File", "Name of default configuration file for Load command (top menu)", OPT_IS_VAR, "Please specify the name of a configuration file", CONFIG_FILE, varCheck }, +{ "Media", "The current installation media type.", + OPT_IS_FUNC, mediaGetType, MEDIA_TYPE, mediaCheck }, { "Use Defaults", "Reset all values to startup defaults", OPT_IS_FUNC, installVarDefaults, 0, resetLogo }, { NULL }, @@ -156,12 +189,13 @@ fire(Option opt) cp(NULL); } else if (opt.type == OPT_IS_VAR) { - dialog_clear(); (void)variable_get_value(opt.aux, opt.data); dialog_clear(); } if (opt.check) opt.check(opt); + clear(); + refresh(); } int diff --git a/usr.sbin/sysinstall/installUpgrade.c b/usr.sbin/sysinstall/installUpgrade.c index 15dfddf..8d56032 100644 --- a/usr.sbin/sysinstall/installUpgrade.c +++ b/usr.sbin/sysinstall/installUpgrade.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.71.2.38 1995/10/18 05:01:55 jkh Exp $ + * $Id: installUpgrade.c,v 1.1 1995/10/19 16:15:40 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -320,20 +320,11 @@ installUpgrade(char *str) if (!(child = fork())) { int i, fd; struct termios foo; - extern int login_tty(int); - for (i = 0; i < 3; i++) - close(i); - fd = open("/dev/ttyv0", O_RDWR); - ioctl(0, TIOCSCTTY, &fd); - dup2(0, 1); - dup2(0, 2); - if (login_tty(fd) == -1) - msgDebug("Can't set the controlling terminal.\n"); signal(SIGTTOU, SIG_IGN); - if (tcgetattr(fd, &foo) != -1) { + if (tcgetattr(0, &foo) != -1) { foo.c_cc[VERASE] = '\010'; - if (tcsetattr(fd, TCSANOW, &foo) == -1) + if (tcsetattr(0, TCSANOW, &foo) == -1) msgDebug("Unable to set the erase character.\n"); } else diff --git a/usr.sbin/sysinstall/options.c b/usr.sbin/sysinstall/options.c index 0127afe..28eadd5 100644 --- a/usr.sbin/sysinstall/options.c +++ b/usr.sbin/sysinstall/options.c @@ -4,7 +4,7 @@ * This is probably the last attempt in the `sysinstall' line, the next * generation being slated for what's essentially a complete rewrite. * - * $Id: options.c,v 1.13 1995/10/18 05:01:59 jkh Exp $ + * $Id: options.c,v 1.14 1995/10/19 15:55:20 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -70,6 +70,37 @@ resetLogo(char *str) return "[WHAP!]"; } +static char * +mediaCheck(Option opt) +{ + if (mediaDevice) { + switch(mediaDevice->type) { + case DEVICE_TYPE_UFS: + case DEVICE_TYPE_DISK: + return "File system"; + + case DEVICE_TYPE_FLOPPY: + return "Floppy"; + + case DEVICE_TYPE_FTP: + return "FTP"; + + case DEVICE_TYPE_CDROM: + return "CDROM"; + + case DEVICE_TYPE_TAPE: + return "Tape"; + + case DEVICE_TYPE_DOS: + return "DOS"; + + case DEVICE_TYPE_NFS: + return "NFS"; + } + } + return "<unset>"; +} + static Option Options[] = { { "NFS Secure", "NFS server talks only on a secure port", OPT_IS_FLAG, &OptFlags, (void *)OPT_NFS_SECURE, NULL }, @@ -97,6 +128,8 @@ static Option Options[] = { OPT_IS_VAR, "Please specify a full pathname to the HTML browser binary:", BROWSER_BINARY, varCheck }, { "Config File", "Name of default configuration file for Load command (top menu)", OPT_IS_VAR, "Please specify the name of a configuration file", CONFIG_FILE, varCheck }, +{ "Media", "The current installation media type.", + OPT_IS_FUNC, mediaGetType, MEDIA_TYPE, mediaCheck }, { "Use Defaults", "Reset all values to startup defaults", OPT_IS_FUNC, installVarDefaults, 0, resetLogo }, { NULL }, @@ -156,12 +189,13 @@ fire(Option opt) cp(NULL); } else if (opt.type == OPT_IS_VAR) { - dialog_clear(); (void)variable_get_value(opt.aux, opt.data); dialog_clear(); } if (opt.check) opt.check(opt); + clear(); + refresh(); } int |