diff options
author | Chris Lumens <clumens@redhat.com> | 2008-07-09 11:11:30 -0400 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2008-07-09 11:11:48 -0400 |
commit | 6a9b978262a6c184a70648b4ca67fc4745a6d89b (patch) | |
tree | a6a3adb96ee6302c5fd0ed9d60184043dca24090 /loader2 | |
parent | 9923659defa125af9b564b0d8db1634bbea0aadf (diff) | |
download | anaconda-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.c | 9 |
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); } } |