--- loader2/hdinstall.c | 12 ++++++------ loader2/loader.h | 3 ++- loader2/method.c | 22 +++++++++++----------- loader2/method.h | 2 +- loader2/nfsinstall.c | 24 ++++++++++++------------ loader2/urlinstall.c | 8 ++++---- 6 files changed, 36 insertions(+), 35 deletions(-) diff --git a/loader2/hdinstall.c b/loader2/hdinstall.c index 14148eb..28fe801 100644 --- a/loader2/hdinstall.c +++ b/loader2/hdinstall.c @@ -285,9 +285,9 @@ char * mountHardDrive(struct installMethod * method, char *kspartition, *ksdirectory; /* handle kickstart data first if available */ - if (loaderData->method == METHOD_HD && loaderData->methodData) { - kspartition = ((struct hdInstallData *)loaderData->methodData)->partition; - ksdirectory = ((struct hdInstallData *)loaderData->methodData)->directory; + if (loaderData->method == METHOD_HD && loaderData->stage2Data) { + kspartition = ((struct hdInstallData *)loaderData->stage2Data)->partition; + ksdirectory = ((struct hdInstallData *)loaderData->stage2Data)->directory; logMessage(INFO, "partition is %s, dir is %s", kspartition, ksdirectory); /* if exist, duplicate */ @@ -499,11 +499,11 @@ void setKickstartHD(struct loaderData_s * loaderData, int argc, } loaderData->method = METHOD_HD; - loaderData->methodData = calloc(sizeof(struct hdInstallData *), 1); + loaderData->stage2Data = calloc(sizeof(struct hdInstallData *), 1); if (partition) - ((struct hdInstallData *)loaderData->methodData)->partition = partition; + ((struct hdInstallData *)loaderData->stage2Data)->partition = partition; if (dir) - ((struct hdInstallData *)loaderData->methodData)->directory = dir; + ((struct hdInstallData *)loaderData->stage2Data)->directory = dir; logMessage(INFO, "results of hd ks, partition is %s, dir is %s", partition, dir); diff --git a/loader2/loader.h b/loader2/loader.h index 1c6d273..5c038fb 100644 --- a/loader2/loader.h +++ b/loader2/loader.h @@ -130,11 +130,12 @@ struct loaderData_s { char * ksFile; int method; char * ddsrc; - void * methodData; + void * stage2Data; char * logLevel; char * updatessrc; char * dogtailurl; char * gdbServer; + char * instRepo; pid_t fw_loader_pid; char *fw_search_pathz; diff --git a/loader2/method.c b/loader2/method.c index bd5426f..9d34991 100644 --- a/loader2/method.c +++ b/loader2/method.c @@ -624,7 +624,7 @@ int getFileFromBlockDevice(char *device, char *path, char * dest) { return rc; } -void setMethodFromCmdline(char * arg, struct loaderData_s * ld) { +void setStage2LocFromCmdline(char * arg, struct loaderData_s * ld) { char * c, * dup; dup = strdup(arg); @@ -632,21 +632,21 @@ void setMethodFromCmdline(char * arg, struct loaderData_s * ld) { /* : will let us delimit real information on the method */ if ((c = strtok(c, ":"))) { c = strtok(NULL, ":"); - + if (!strncmp(arg, "nfs:", 4)) { ld->method = METHOD_NFS; - ld->methodData = calloc(sizeof(struct nfsInstallData *), 1); + ld->stage2Data = calloc(sizeof(struct nfsInstallData *), 1); - ((struct nfsInstallData *)ld->methodData)->mountOpts = NULL; - ((struct nfsInstallData *)ld->methodData)->host = strdup(c); + ((struct nfsInstallData *)ld->stage2Data)->mountOpts = NULL; + ((struct nfsInstallData *)ld->stage2Data)->host = strdup(c); if ((c = strtok(NULL, ":"))) { - ((struct nfsInstallData *)ld->methodData)->directory = strdup(c); + ((struct nfsInstallData *)ld->stage2Data)->directory = strdup(c); } } else if (!strncmp(arg, "ftp:", 4) || !strncmp(arg, "http:", 5)) { ld->method = METHOD_URL; - ld->methodData = calloc(sizeof(struct urlInstallData *), 1); - ((struct urlInstallData *)ld->methodData)->url = strdup(arg); + ld->stage2Data = calloc(sizeof(struct urlInstallData *), 1); + ((struct urlInstallData *)ld->stage2Data)->url = strdup(arg); #if !defined(__s390__) && !defined(__s390x__) } else if (!strncmp(arg, "cdrom:", 6)) { ld->method = METHOD_CDROM; @@ -654,10 +654,10 @@ void setMethodFromCmdline(char * arg, struct loaderData_s * ld) { } else if (!strncmp(arg, "harddrive:", 10) || !strncmp(arg, "hd:", 3)) { ld->method = METHOD_HD; - ld->methodData = calloc(sizeof(struct hdInstallData *), 1); - ((struct hdInstallData *)ld->methodData)->partition = strdup(c); + ld->stage2Data = calloc(sizeof(struct hdInstallData *), 1); + ((struct hdInstallData *)ld->stage2Data)->partition = strdup(c); if ((c = strtok(NULL, ":"))) { - ((struct hdInstallData *)ld->methodData)->directory = strdup(c); + ((struct hdInstallData *)ld->stage2Data)->directory = strdup(c); } } } diff --git a/loader2/method.h b/loader2/method.h index 03fc529..dc5f61c 100644 --- a/loader2/method.h +++ b/loader2/method.h @@ -58,6 +58,6 @@ int unpackCpioBall(char * ballPath, char * rootDir); void copyUpdatesImg(char * path); void copyProductImg(char * path); -void setMethodFromCmdline(char * arg, struct loaderData_s * ld); +void setStage2LocFromCmdline(char * arg, struct loaderData_s * ld); #endif diff --git a/loader2/nfsinstall.c b/loader2/nfsinstall.c index 75d5548..ae309d2 100644 --- a/loader2/nfsinstall.c +++ b/loader2/nfsinstall.c @@ -118,14 +118,14 @@ char * mountNfsImage(struct installMethod * method, switch (stage) { case NFS_STAGE_NFS: logMessage(INFO, "going to do nfsGetSetup"); - if (loaderData->method == METHOD_NFS && loaderData->methodData) { - host = ((struct nfsInstallData *)loaderData->methodData)->host; - directory = ((struct nfsInstallData *)loaderData->methodData)->directory; + if (loaderData->method == METHOD_NFS && loaderData->stage2Data) { + host = ((struct nfsInstallData *)loaderData->stage2Data)->host; + directory = ((struct nfsInstallData *)loaderData->stage2Data)->directory; - if (((struct nfsInstallData *) loaderData->methodData)->mountOpts == NULL) + if (((struct nfsInstallData *) loaderData->stage2Data)->mountOpts == NULL) mountOpts = strdup("ro"); else - rc = asprintf(&mountOpts, "ro,%s", ((struct nfsInstallData *) loaderData->methodData)->mountOpts); + rc = asprintf(&mountOpts, "ro,%s", ((struct nfsInstallData *) loaderData->stage2Data)->mountOpts); logMessage(INFO, "host is %s, dir is %s, opts are '%s'", host, directory, mountOpts); @@ -373,15 +373,15 @@ void setKickstartNfs(struct loaderData_s * loaderData, int argc, } loaderData->method = METHOD_NFS; - loaderData->methodData = calloc(sizeof(struct nfsInstallData *), 1); - ((struct nfsInstallData *)loaderData->methodData)->host = host; - ((struct nfsInstallData *)loaderData->methodData)->directory = dir; - ((struct nfsInstallData *)loaderData->methodData)->mountOpts = mountOpts; + loaderData->stage2Data = calloc(sizeof(struct nfsInstallData *), 1); + ((struct nfsInstallData *)loaderData->stage2Data)->host = host; + ((struct nfsInstallData *)loaderData->stage2Data)->directory = dir; + ((struct nfsInstallData *)loaderData->stage2Data)->mountOpts = mountOpts; logMessage(INFO, "results of nfs, host is %s, dir is %s, opts are '%s'", - ((struct nfsInstallData *) loaderData->methodData)->host, - ((struct nfsInstallData *) loaderData->methodData)->directory, - ((struct nfsInstallData *) loaderData->methodData)->mountOpts); + ((struct nfsInstallData *) loaderData->stage2Data)->host, + ((struct nfsInstallData *) loaderData->stage2Data)->directory, + ((struct nfsInstallData *) loaderData->stage2Data)->mountOpts); } diff --git a/loader2/urlinstall.c b/loader2/urlinstall.c index 55b7c3d..9bb230b 100644 --- a/loader2/urlinstall.c +++ b/loader2/urlinstall.c @@ -221,8 +221,8 @@ char * mountUrlImage(struct installMethod * method, while (stage != URL_STAGE_DONE) { switch(stage) { case URL_STAGE_MAIN: - if (loaderData->method == METHOD_URL && loaderData->methodData) { - url = ((struct urlInstallData *)loaderData->methodData)->url; + if (loaderData->method == METHOD_URL && loaderData->stage2Data) { + url = ((struct urlInstallData *)loaderData->stage2Data)->url; logMessage(INFO, "URL_STAGE_MAIN - url is %s", url); if (!url) { @@ -460,8 +460,8 @@ void setKickstartUrl(struct loaderData_s * loaderData, int argc, return; } - loaderData->methodData = calloc(sizeof(struct urlInstallData *), 1); - ((struct urlInstallData *)loaderData->methodData)->url = url; + loaderData->stage2Data = calloc(sizeof(struct urlInstallData *), 1); + ((struct urlInstallData *)loaderData->stage2Data)->url = url; logMessage(INFO, "results of url ks, url %s", url); } -- 1.5.5.1 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list