summaryrefslogtreecommitdiffstats
path: root/loader2/method.c
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2006-07-27 18:43:50 +0000
committerDavid Cantrell <dcantrell@redhat.com>2006-07-27 18:43:50 +0000
commit178e15d17644fe5b8aef868fe746501889ed2316 (patch)
treee57ef6df01817d5c0fde67719ed958e55dbff12c /loader2/method.c
parentf516c56ac2b3bc7f0f03222f4770639ed926e867 (diff)
* loader2/cdinstall.c: loaderData->method is now an int.
* loader2/hdinstall.c: Whitespace consistency, loaderData->method is now an int. * loader2/loader.c (doLoaderMain): loaderData->method is now an int, pass methodNum to readNetConfig(). * loader2/loader.h: char * method -> int method. * loader2/method.c: Set loaderData->method to appropriate METHOD_ value since it's now an int. * loader2/method.h: Add METHOD_* macros. * loader2/net.c (cidrCallback): Dialog wording change. * loader2/net.c (readNetConfig): Take methodNum as a param, pass methodNum to configureTCPIP(). * loader2/net.c (configureTCPIP): Take methodNum as a param, if user selects METHOD_NFS and unchecks IPv4, display error dialog and ask user to try again. * loader2/net.c (kickstartNetworkUp): Pass methodNum to readNetConfig(). * loader2/net.h: Prototype updates. * loader2/nfsinstall.c: loaderData->method is now an int. * loader2/urlinstall.c: loaderData->method is now an int.
Diffstat (limited to 'loader2/method.c')
-rw-r--r--loader2/method.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/loader2/method.c b/loader2/method.c
index 47e070485..1794559df 100644
--- a/loader2/method.c
+++ b/loader2/method.c
@@ -690,7 +690,7 @@ void setMethodFromCmdline(char * arg, struct loaderData_s * ld) {
c = strtok(NULL, ":");
if (!strncmp(arg, "nfs:", 4)) {
- ld->method = strdup("nfs");
+ ld->method = METHOD_NFS;
ld->methodData = calloc(sizeof(struct nfsInstallData *), 1);
((struct nfsInstallData *)ld->methodData)->host = strdup(c);
if ((c = strtok(NULL, ":"))) {
@@ -698,14 +698,14 @@ void setMethodFromCmdline(char * arg, struct loaderData_s * ld) {
}
} else if (!strncmp(arg, "ftp:", 4) ||
!strncmp(arg, "http:", 5)) {
- ld->method = strcmp(arg, "ftp") ? strdup("ftp") : strdup("http");
+ ld->method = strcmp(arg, "ftp") ? METHOD_FTP : METHOD_HTTP;
ld->methodData = calloc(sizeof(struct urlInstallData *), 1);
((struct urlInstallData *)ld->methodData)->url = strdup(arg);
} else if (!strncmp(arg, "cdrom:", 6)) {
- ld->method = strdup("cdrom");
+ ld->method = METHOD_CDROM;
} else if (!strncmp(arg, "harddrive:", 10) ||
!strncmp(arg, "hd:", 3)) {
- ld->method = strdup("hd");
+ ld->method = METHOD_HD;
ld->methodData = calloc(sizeof(struct hdInstallData *), 1);
((struct hdInstallData *)ld->methodData)->partition = strdup(c);
if ((c = strtok(NULL, ":"))) {