summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--isys/probe.c11
-rw-r--r--loader2/net.c15
2 files changed, 22 insertions, 4 deletions
diff --git a/isys/probe.c b/isys/probe.c
index 8da11c9b5..5ad013d13 100644
--- a/isys/probe.c
+++ b/isys/probe.c
@@ -102,11 +102,14 @@ void kdFree(struct knownDevices * devices) {
}
int kdFindNetList(struct knownDevices * devices, int code) {
- int fd;
+ int fd, i;
char *buf;
char * start, * end;
+ struct device **kdevs;
struct kddevice newDevice;
int s;
+
+ kdevs = probeDevices(CLASS_NETWORK, BUS_UNSPEC, PROBE_ALL);
if ((fd = open("/proc/net/dev", O_RDONLY)) < 0) {
fprintf(stderr, "failed to open /proc/net/dev!\n");
@@ -139,6 +142,12 @@ int kdFindNetList(struct knownDevices * devices, int code) {
if (!deviceKnown(devices, start)) {
newDevice.name = strdup(start);
newDevice.model = NULL;
+ if (kdevs) {
+ for (i = 0; kdevs[i]; i++)
+ if (kdevs[i]->device && !strcmp(kdevs[i]->device, newDevice.name))
+ newDevice.model = strdup(kdevs[i]->desc);
+
+ }
newDevice.class = CLASS_NETWORK;
newDevice.code = code;
addDevice(devices, newDevice);
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)