summaryrefslogtreecommitdiffstats
path: root/loader2
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2008-07-09 11:11:30 -0400
committerChris Lumens <clumens@redhat.com>2008-07-09 11:11:48 -0400
commit6a9b978262a6c184a70648b4ca67fc4745a6d89b (patch)
treea6a3adb96ee6302c5fd0ed9d60184043dca24090 /loader2
parent9923659defa125af9b564b0d8db1634bbea0aadf (diff)
downloadanaconda-6a9b978262a6c184a70648b4ca67fc4745a6d89b.tar.gz
anaconda-6a9b978262a6c184a70648b4ca67fc4745a6d89b.tar.xz
anaconda-6a9b978262a6c184a70648b4ca67fc4745a6d89b.zip
Don't strip too much off the NFS directory path.
Diffstat (limited to 'loader2')
-rw-r--r--loader2/nfsinstall.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/loader2/nfsinstall.c b/loader2/nfsinstall.c
index 6c5dfefe6..635102b1e 100644
--- a/loader2/nfsinstall.c
+++ b/loader2/nfsinstall.c
@@ -141,7 +141,7 @@ char * mountNfsImage(struct installMethod * method,
directory = strdup(directory);
}
} else {
- char *stage2img, *substr;
+ char *stage2img, *substr, *tmp;
if (nfsGetSetup(&host, &directory) == LOADER_BACK)
return NULL;
@@ -156,11 +156,16 @@ char * mountNfsImage(struct installMethod * method,
*/
substr = strstr(directory, ".img");
if (!substr || (substr && *(substr+4) != '\0')) {
- if (asprintf(&directory, "%s/images/%s", directory,
+ if (asprintf(&tmp, "%s/images/%s", directory,
stage2img) == -1) {
logMessage(CRITICAL, "%s: %d: %m", __func__, __LINE__);
abort();
}
+
+ free(((struct nfsInstallData *) loaderData->stage2Data)->directory);
+ ((struct nfsInstallData *) loaderData->stage2Data)->directory = strdup(tmp);
+ directory = ((struct nfsInstallData *) loaderData->stage2Data)->directory;
+ free(tmp);
}
}