summaryrefslogtreecommitdiffstats
path: root/loader/method.c
diff options
context:
space:
mode:
authorStijn Hoop <stijn@sandcat.nl>2009-10-16 10:04:31 +0200
committerRadek Vykydal <rvykydal@redhat.com>2009-11-03 12:08:02 +0100
commit0148cfc2f0e4d90e8d63170aa1cfa16f1e9e1dc6 (patch)
tree9639eadf57842d5eed214f9c8d9fdd3101b684aa /loader/method.c
parentd02b51149c49a2749662f365d2587a5842bc33f7 (diff)
Consolidate the parsing of nfs: locations for ks= and stage2= (#529197)
Makes sure that NFS options can be used in both parameters. Previously this was only parsed for ks= and not for stage2= using two separate code paths. Move this to a shared function in loader/nfsinstall.c.
Diffstat (limited to 'loader/method.c')
-rw-r--r--loader/method.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/loader/method.c b/loader/method.c
index 18069defc..ebfe557d5 100644
--- a/loader/method.c
+++ b/loader/method.c
@@ -505,12 +505,10 @@ void setStage2LocFromCmdline(char * arg, struct loaderData_s * ld) {
ld->method = METHOD_NFS;
ld->stage2Data = calloc(sizeof(struct nfsInstallData *), 1);
- ((struct nfsInstallData *)ld->stage2Data)->mountOpts = NULL;
- ((struct nfsInstallData *)ld->stage2Data)->host = strdup(c);
- if ((c = strtok(NULL, ":")))
- ((struct nfsInstallData *)ld->stage2Data)->directory = strdup(c);
- else
- ((struct nfsInstallData *)ld->stage2Data)->directory = NULL;
+ parseNfsHostPathOpts(arg + 4,
+ &(((struct nfsInstallData *)ld->stage2Data)->host),
+ &(((struct nfsInstallData *)ld->stage2Data)->directory),
+ &(((struct nfsInstallData *)ld->stage2Data)->mountOpts));
} else if (!strncmp(arg, "ftp:", 4) ||
!strncmp(arg, "http", 4)) {
ld->method = METHOD_URL;