diff options
author | David Cantrell <dcantrell@redhat.com> | 2006-07-27 18:43:50 +0000 |
---|---|---|
committer | David Cantrell <dcantrell@redhat.com> | 2006-07-27 18:43:50 +0000 |
commit | 178e15d17644fe5b8aef868fe746501889ed2316 (patch) | |
tree | e57ef6df01817d5c0fde67719ed958e55dbff12c /loader2/nfsinstall.c | |
parent | f516c56ac2b3bc7f0f03222f4770639ed926e867 (diff) | |
download | anaconda-178e15d17644fe5b8aef868fe746501889ed2316.tar.gz anaconda-178e15d17644fe5b8aef868fe746501889ed2316.tar.xz anaconda-178e15d17644fe5b8aef868fe746501889ed2316.zip |
* 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/nfsinstall.c')
-rw-r--r-- | loader2/nfsinstall.c | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/loader2/nfsinstall.c b/loader2/nfsinstall.c index a8a2bb785..d1ffbca1d 100644 --- a/loader2/nfsinstall.c +++ b/loader2/nfsinstall.c @@ -71,8 +71,6 @@ int nfsGetSetup(char ** hostptr, char ** dirptr) { return 0; } - - char * mountNfsImage(struct installMethod * method, char * location, struct loaderData_s * loaderData, moduleInfoSet modInfo, moduleList modLoaded, @@ -95,9 +93,7 @@ char * mountNfsImage(struct installMethod * method, switch (stage) { case NFS_STAGE_NFS: logMessage(INFO, "going to do nfsGetSetup"); - if (loaderData->method && *loaderData->method && - !strncmp(loaderData->method, "nfs", 3) && - loaderData->methodData) { + if (loaderData->method == METHOD_NFS && loaderData->methodData) { host = ((struct nfsInstallData *)loaderData->methodData)->host; directory = ((struct nfsInstallData *)loaderData->methodData)->directory; mountOpts = ((struct nfsInstallData *)loaderData->methodData)->mountOpts; @@ -106,8 +102,7 @@ char * mountNfsImage(struct installMethod * method, if (!host || !directory) { logMessage(ERROR, "missing host or directory specification"); - free(loaderData->method); - loaderData->method = NULL; + loaderData->method = -1; break; } else { host = strdup(host); @@ -129,9 +124,8 @@ char * mountNfsImage(struct installMethod * method, if (loaderData->noDns && !(inet_pton(AF_INET, host, &ip))) { newtWinMessage(_("Error"), _("OK"), _("Hostname specified with no DNS configured")); - if (loaderData->method) { - free(loaderData->method); - loaderData->method = NULL; + if (loaderData->method >= 0) { + loaderData->method = -1; } break; } @@ -209,9 +203,8 @@ char * mountNfsImage(struct installMethod * method, "contain a %s installation tree."), getProductName()); newtWinMessage(_("Error"), _("OK"), buf); - if (loaderData->method) { - free(loaderData->method); - loaderData->method = NULL; + if (loaderData->method >= 0) { + loaderData->method = -1; } @@ -220,9 +213,8 @@ char * mountNfsImage(struct installMethod * method, newtWinMessage(_("Error"), _("OK"), _("That directory could not be mounted from " "the server.")); - if (loaderData->method) { - free(loaderData->method); - loaderData->method = NULL; + if (loaderData->method >= 0) { + loaderData->method = -1; } break; } @@ -269,7 +261,7 @@ void setKickstartNfs(struct loaderData_s * loaderData, int argc, return; } - loaderData->method = strdup("nfs"); + loaderData->method = METHOD_NFS; loaderData->methodData = calloc(sizeof(struct nfsInstallData *), 1); if (host) ((struct nfsInstallData *)loaderData->methodData)->host = host; @@ -373,3 +365,5 @@ int getFileFromNfs(char * url, char * dest, struct loaderData_s * loaderData) { int kickstartFromNfs(char * url, struct loaderData_s * loaderData) { return getFileFromNfs(url, "/tmp/ks.cfg", loaderData); } + +/* vim:set shiftwidth=4 softtabstop=4: */ |