diff options
author | Erik Troan <ewt@redhat.com> | 1999-08-20 18:29:10 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 1999-08-20 18:29:10 +0000 |
commit | 8bb9bbd84da816ebe13b94cd0b01b50c151fe756 (patch) | |
tree | f712d46895749b3f78dd8cd41956823f2803cc4f | |
parent | 6fd91d4aab4b2dd9cc72767c50d96b917a4302bd (diff) | |
download | anaconda-8bb9bbd84da816ebe13b94cd0b01b50c151fe756.tar.gz anaconda-8bb9bbd84da816ebe13b94cd0b01b50c151fe756.tar.xz anaconda-8bb9bbd84da816ebe13b94cd0b01b50c151fe756.zip |
pass dir for hard drive installs into url
-rw-r--r-- | loader/loader.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/loader/loader.c b/loader/loader.c index c851e18df..246474404 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -465,7 +465,6 @@ static char * mountHardDrive(char * location, struct knownDevices * kd, /* XXX load scsi devices here */ - /*mlLoadModule("vfat", modLoaded, modDeps, NULL, flags);*/ for (i = 0; i < kd->numKnown; i++) { @@ -544,7 +543,7 @@ static char * mountHardDrive(char * location, struct knownDevices * kd, answer = newtRunForm(form); part = newtListboxGetCurrent(listbox); - if (dir && *dir) + if (*dir) dir = strdup(dir); else dir = NULL; @@ -577,7 +576,6 @@ static char * mountHardDrive(char * location, struct knownDevices * kd, path = malloc(50 + (dir ? strlen(dir) : 2)); sprintf(path, "/tmp/hdimage/%s/RedHat/base/stage2.img", dir ? dir : ""); - if (dir) free(dir); if ((fd = open(path, O_RDONLY)) < 0) { logMessage("cannot open %s", path); newtWinMessage(_("Error"), _("Ok"), @@ -594,9 +592,9 @@ static char * mountHardDrive(char * location, struct knownDevices * kd, close(fd); if (rc) continue; - url = malloc(50); - sprintf(url, "hd://%s/.", part->name + 5); - + url = malloc(50 + strlen(dir)); + sprintf(url, "hd://%s/%s", part->name + 5, dir ? dir : "."); + if (dir) free(dir); } done = 1; @@ -856,7 +854,7 @@ static char * doMountImage(char * location, struct knownDevices * kd, int networkAvailable = 0; int localAvailable = 0; void * class; - char * url; + char * url = NULL; if ((class = isysGetModuleList(modInfo, DRIVER_NET))) { networkAvailable = 1; |