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 /usr.sbin/sysinstall/options.c | |
parent | 45cf2943d04dcb0b87c6372e28b812ce8e6dee59 (diff) | |
download | FreeBSD-src-6d13f9a708f62766aa05501fc6b9b931ff1e726f.zip FreeBSD-src-6d13f9a708f62766aa05501fc6b9b931ff1e726f.tar.gz |
Sync.
Diffstat (limited to 'usr.sbin/sysinstall/options.c')
-rw-r--r-- | usr.sbin/sysinstall/options.c | 38 |
1 files changed, 36 insertions, 2 deletions
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 |