summaryrefslogtreecommitdiffstats
path: root/loader
diff options
context:
space:
mode:
authorAles Kozumplik <akozumpl@redhat.com>2010-08-16 15:59:15 +0200
committerAles Kozumplik <akozumpl@redhat.com>2010-08-18 14:50:09 +0200
commit891eb3fcfb26ec7e1fce568ee875e15d6c358439 (patch)
tree5cc789566cfefe4a442cbfb0b405d95bd472de39 /loader
parent918209d16351e64deaa64ad36ace866cb88d2679 (diff)
downloadanaconda-891eb3fcfb26ec7e1fce568ee875e15d6c358439.tar.gz
anaconda-891eb3fcfb26ec7e1fce568ee875e15d6c358439.tar.xz
anaconda-891eb3fcfb26ec7e1fce568ee875e15d6c358439.zip
loader: parseCmdLineIp* takes just the value as an argument now.
Also see 8f0ffbce8df1e05cd63ffd67e1057cb870ef96ad.
Diffstat (limited to 'loader')
-rw-r--r--loader/loader.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/loader/loader.c b/loader/loader.c
index e53b2f3d4..2b470a208 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -822,14 +822,8 @@ static void parseCmdLineIp(struct loaderData_s * loaderData, char *argv)
{
/* Detect pxelinux */
if (strstr(argv, ":") != NULL) {
- char *start, *end;
-
- /* IP */
- if (!strncmp(argv, "ip=", 3)) {
- start = argv + 3;
- } else {
- start = argv;
- }
+ char *start = argv;
+ char *end;
end = strstr(start, ":");
loaderData->ipv4 = strndup(start, end-start);
@@ -861,7 +855,7 @@ static void parseCmdLineIp(struct loaderData_s * loaderData, char *argv)
start = end + 1;
loaderData->netmask = strdup(start);
} else {
- loaderData->ipv4 = strdup(argv + 3);
+ loaderData->ipv4 = strdup(argv);
loaderData->ipinfo_set = 1;
}
@@ -881,9 +875,9 @@ static void parseCmdLineIpv6(struct loaderData_s * loaderData, char *argv)
*/
loaderData->ipv6 = NULL;
- if (!strncasecmp(argv, "ipv6=dhcp", 9)) {
+ if (!strncasecmp(argv, "dhcp", 4)) {
loaderData->ipv6 = strdup("dhcp");
- } else if (!strncasecmp(argv, "ipv6=auto", 9)) {
+ } else if (!strncasecmp(argv, "auto", 4)) {
loaderData->ipv6 = strdup("auto");
}
@@ -891,8 +885,6 @@ static void parseCmdLineIpv6(struct loaderData_s * loaderData, char *argv)
loaderData->ipv6info_set = 1;
flags |= LOADER_FLAGS_IPV6_PARAM;
}
-
- return;
}
#endif