diff options
Diffstat (limited to 'loader2/net.c')
-rw-r--r-- | loader2/net.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/loader2/net.c b/loader2/net.c index e54deeaed..a0e50da28 100644 --- a/loader2/net.c +++ b/loader2/net.c @@ -706,6 +706,7 @@ int chooseNetworkInterface(struct knownDevices * kd, int deviceNums = 0; int deviceNum; char ** devices; + char ** deviceNames; int foundDev = 0; /* JKFIXME: this is a lot bigger than it has to be.. */ @@ -715,14 +716,16 @@ int chooseNetworkInterface(struct knownDevices * kd, continue; if (kd->known[i].model) { - devices[deviceNums++] = alloca(strlen(kd->known[i].name) + - strlen(kd->known[i].model) + 4); - sprintf(devices[deviceNums-1],"%s - %s", + deviceNames[deviceNums] = alloca(strlen(kd->known[i].name) + + strlen(kd->known[i].model) + 4); + sprintf(deviceNames[deviceNums],"%s - %s", kd->known[i].name, kd->known[i].model); - if (strlen(devices[deviceNums-1]) > max) - max = strlen(devices[deviceNums-1]); + if (strlen(deviceNames[deviceNums]) > max) + max = strlen(deviceNames[deviceNums]); + devices[deviceNums++] = kd->known[i].name; } else { - devices[deviceNums++] = kd->known[i].name; + devices[deviceNums] = kd->known[i].name; + deviceNames[deviceNums++] = kd->known[i].name; } /* make sure that this device is disabled */ @@ -759,7 +762,7 @@ int chooseNetworkInterface(struct knownDevices * kd, rc = newtWinMenu(_("Networking Device"), _("You have multiple network devices on this system. " "Which would you like to install through?"), max, 10, 10, - deviceNums < 6 ? deviceNums : 6, devices, + deviceNums < 6 ? deviceNums : 6, deviceNames, &deviceNum, _("OK"), _("Back"), NULL); if (rc == 2) return LOADER_BACK; |