summaryrefslogtreecommitdiffstats
path: root/loader2/net.c
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2003-07-03 04:41:30 +0000
committerBill Nottingham <notting@redhat.com>2003-07-03 04:41:30 +0000
commitad4b0bfcf3ad8e25c3c509464e07c002f43b6dd5 (patch)
tree20a54d6f338914635490de768950d72dc8121b51 /loader2/net.c
parenta2e7edb16db50a54b0d7937fd07ab78cc4da94fa (diff)
downloadanaconda-ad4b0bfcf3ad8e25c3c509464e07c002f43b6dd5.tar.gz
anaconda-ad4b0bfcf3ad8e25c3c509464e07c002f43b6dd5.tar.xz
anaconda-ad4b0bfcf3ad8e25c3c509464e07c002f43b6dd5.zip
fill in model info of net devices with their description
use this in choose-your-own-netdevice screen requires kudzu-1.1.9 or higher.
Diffstat (limited to 'loader2/net.c')
-rw-r--r--loader2/net.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/loader2/net.c b/loader2/net.c
index 799580a38..e54deeaed 100644
--- a/loader2/net.c
+++ b/loader2/net.c
@@ -702,7 +702,7 @@ void setKickstartNetwork(struct loaderData_s * loaderData, int argc,
int chooseNetworkInterface(struct knownDevices * kd,
struct loaderData_s * loaderData,
int flags) {
- int i, rc;
+ int i, rc, max = 40;
int deviceNums = 0;
int deviceNum;
char ** devices;
@@ -714,7 +714,16 @@ int chooseNetworkInterface(struct knownDevices * kd,
if (kd->known[i].class != CLASS_NETWORK)
continue;
- devices[deviceNums++] = kd->known[i].name;
+ 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",
+ kd->known[i].name, kd->known[i].model);
+ if (strlen(devices[deviceNums-1]) > max)
+ max = strlen(devices[deviceNums-1]);
+ } else {
+ devices[deviceNums++] = kd->known[i].name;
+ }
/* make sure that this device is disabled */
pumpDisableInterface(kd->known[i].name);
@@ -749,7 +758,7 @@ int chooseNetworkInterface(struct knownDevices * kd,
deviceNum = 0;
rc = newtWinMenu(_("Networking Device"),
_("You have multiple network devices on this system. "
- "Which would you like to install through?"), 40, 10, 10,
+ "Which would you like to install through?"), max, 10, 10,
deviceNums < 6 ? deviceNums : 6, devices,
&deviceNum, _("OK"), _("Back"), NULL);
if (rc == 2)