summaryrefslogtreecommitdiffstats
path: root/loader
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2008-10-10 15:18:12 -1000
committerDavid Cantrell <dcantrell@redhat.com>2008-10-10 15:28:52 -1000
commite98c8f264cccf7ae27322d901d8a75634d3302ae (patch)
tree6dbc19589e10edd60372214b618f9272a79ee16a /loader
parent302b52af3d2adf846abf3d882794f17d252758a4 (diff)
Fix how configureTCPIP() returns.
Clean up the loop termination and return value handling. Currently the configureTCPIP() function returns LOADER_NOOP if the user chose dhcp and LOADER_OK if the user chose manual configuration.
Diffstat (limited to 'loader')
-rw-r--r--loader/net.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/loader/net.c b/loader/net.c
index 01dfd6f4b..199ba5fbd 100644
--- a/loader/net.c
+++ b/loader/net.c
@@ -472,7 +472,7 @@ int readNetConfig(char * device, iface_t * iface,
int configureTCPIP(char * device, iface_t * iface,
struct netconfopts * opts, int methodNum) {
- int i = 0, z = 0, skipForm = 0;
+ int i = 0, z = 0, skipForm = 0, ret;
newtComponent f, okay, back, answer;
newtComponent ipv4Checkbox, v4Method[2];
#ifdef ENABLE_IPV6
@@ -647,27 +647,24 @@ int configureTCPIP(char * device, iface_t * iface,
if (!FL_NOIPV4(flags) && iface->ipv4method == IPV4_DHCP_METHOD) {
#endif
/* DHCP selected, exit the loop */
+ ret = LOADER_NOOP;
+ i = 1;
+#ifdef ENABLE_IPV6
+ } else if ((!FL_NOIPV4(flags) && iface->ipv4method == IPV4_MANUAL_METHOD) ||
+ (!FL_NOIPV6(flags) && iface->ipv6method == IPV6_MANUAL_METHOD)) {
+#else
+ } else if (!FL_NOIPV4(flags) && iface->ipv4method == IPV4_MANUAL_METHOD) {
+#endif
+
+ /* manual IP configuration selected */
+ ret = LOADER_OK;
i = 1;
- } else {
- /* manual IP configuration for IPv4 and IPv6 */
- newtFormDestroy(f);
- newtPopWindow();
- return LOADER_OK;
}
} while (i != 1);
newtFormDestroy(f);
newtPopWindow();
-
-#ifdef ENABLE_IPV6
- if ((!FL_NOIPV4(flags) && iface->ipv4method == IPV4_MANUAL_METHOD) ||
- (!FL_NOIPV6(flags) && iface->ipv6method == IPV6_MANUAL_METHOD))
-#else
- if (!FL_NOIPV4(flags) && iface->ipv4method == IPV4_MANUAL_METHOD)
-#endif
- return LOADER_OK;
- else
- return LOADER_NOOP;
+ return ret;
}
int manualNetConfig(char * device, iface_t * iface,