diff options
author | pst <pst@FreeBSD.org> | 1997-04-01 02:08:07 +0000 |
---|---|---|
committer | pst <pst@FreeBSD.org> | 1997-04-01 02:08:07 +0000 |
commit | ed64d2ada6ce79ef78e153b7f448f6f1d57a5d91 (patch) | |
tree | f52bd3f88ac6cb6c374ad61898d30569fe20f034 /release | |
parent | e9b81e984575bb50652e1e974f2829e9c4e90029 (diff) | |
download | FreeBSD-src-ed64d2ada6ce79ef78e153b7f448f6f1d57a5d91.zip FreeBSD-src-ed64d2ada6ce79ef78e153b7f448f6f1d57a5d91.tar.gz |
Merge in bugfixes from 2.2
Diffstat (limited to 'release')
-rw-r--r-- | release/sysinstall/variable_load.c | 46 |
1 files changed, 17 insertions, 29 deletions
diff --git a/release/sysinstall/variable_load.c b/release/sysinstall/variable_load.c index e48e3d6..93d9ee3 100644 --- a/release/sysinstall/variable_load.c +++ b/release/sysinstall/variable_load.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: variable_load.c,v 1.1 1997/03/19 10:09:28 jkh Exp $ + * $Id: variable_load.c,v 1.1.2.2 1997/04/01 02:04:58 pst Exp $ * * Copyright (c) 1997 * Paul Traina. All rights reserved. @@ -41,46 +41,34 @@ int variableLoad(dialogMenuItem * self) { - extern char *distWanted; int what = DITEM_RESTORE; - char *cp, *old; char buf[BUFSIZ]; + extern char *distWanted; + char *cp; FILE *fp; mediaClose(); dialog_clear_norefresh(); - if ((cp = variable_get(VAR_INSTALL_CFG)) != NULL) { - old = strdup(cp); - cp = variable_get_value(VAR_INSTALL_CFG, - "Specify the name of a configuration file\n" - "residing on a MSDOS or UFS floppy.\n\n" - "(default: %s)"); - if (!cp) { - free(old); - return DITEM_FAILURE | what; - } - if (!*cp) - variable_set2(VAR_INSTALL_CFG, cp); - - free(old); - - } else { - cp = variable_get_value(VAR_INSTALL_CFG, - "Specify the name of a configuration file\n" - "residing on a MSDOS or UFS floppy."); - if (!cp || !*cp) { - variable_unset(VAR_INSTALL_CFG); - return DITEM_FAILURE | what; - } + cp = variable_get_value(VAR_INSTALL_CFG, + "Specify the name of a configuration file\n" + "residing on a MSDOS or UFS floppy."); + if (!cp || !*cp) { + variable_unset(VAR_INSTALL_CFG); + return DITEM_FAILURE | what; } distWanted = cp = variable_get(VAR_INSTALL_CFG); /* Try to open the floppy drive if we can do that first */ - if (DITEM_STATUS(mediaSetFloppy(NULL)) == DITEM_FAILURE || - mediaDevice->init(mediaDevice)) { - msgConfirm("Unable to access floppy."); + if (DITEM_STATUS(mediaSetFloppy(NULL)) == DITEM_FAILURE) { + msgConfirm("Unable to set media device to floppy."); + what |= DITEM_FAILURE; + goto terminate_device; + } + + if (!mediaDevice->init(mediaDevice)) { + msgConfirm("Unable to mount floppy filesystem."); what |= DITEM_FAILURE; goto terminate_device; } |