summaryrefslogtreecommitdiffstats
path: root/loader2
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2008-05-14 17:24:35 -0400
committerChris Lumens <clumens@redhat.com>2008-06-18 10:44:55 -0400
commitcccedb22602a5f09a66eb3eb31e6dff800dd8b07 (patch)
tree5c4965733b07d9391cab32f312ce2149bc5e2abc /loader2
parentd043bdc135801a4065d5c6b1fd6eef0b35ffe89c (diff)
Rename methodData to stage2Data, since that's more appropriate.
Diffstat (limited to 'loader2')
-rw-r--r--loader2/hdinstall.c12
-rw-r--r--loader2/loader.h3
-rw-r--r--loader2/method.c22
-rw-r--r--loader2/method.h2
-rw-r--r--loader2/nfsinstall.c24
-rw-r--r--loader2/urlinstall.c8
6 files changed, 36 insertions, 35 deletions
diff --git a/loader2/hdinstall.c b/loader2/hdinstall.c
index 14148ebde..28fe801a3 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 1c6d2730b..5c038fbaa 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 bd5426f8a..9d34991f1 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 03fc529ee..dc5f61c72 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 75d55488a..ae309d2f8 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 55b7c3dad..9bb230ba9 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);
}