summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2008-01-16 14:50:02 -0500
committerChris Lumens <clumens@redhat.com>2008-01-16 14:50:02 -0500
commit073424a2f032427cf1f5da6818a60b406461723f (patch)
tree5c97b8533c28361e306dc4af3218b01e49ef6a88
parent062a1e5ebbf6dab03524a125c1ce34d3cea43fcb (diff)
downloadanaconda-073424a2f032427cf1f5da6818a60b406461723f.tar.gz
anaconda-073424a2f032427cf1f5da6818a60b406461723f.tar.xz
anaconda-073424a2f032427cf1f5da6818a60b406461723f.zip
Add the MAC address to the network device selection screen (#428229).
-rw-r--r--isys/devices.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/isys/devices.c b/isys/devices.c
index 47b4a8263..f61daf88b 100644
--- a/isys/devices.c
+++ b/isys/devices.c
@@ -143,7 +143,6 @@ storagedone:
new = calloc(1, sizeof(struct device));
new->device = strdup(ent->d_name);
/* FIXME */
- rc = asprintf(&new->description,"Ethernet device %s",new->device);
snprintf(path, 64, "/sys/class/net/%s/address", ent->d_name);
fd = open(path, O_RDONLY);
if (fd != -1) {
@@ -153,6 +152,13 @@ storagedone:
new->priv.hwaddr = strdup(buf);
}
}
+
+ if (new->priv.hwaddr)
+ rc = asprintf(&new->description, "Ethernet device %s - %s",
+ new->device, new->priv.hwaddr);
+ else
+ rc = asprintf(&new->description, "Ethernet device %s", new->device);
+
ret = realloc(ret, (numdevices+2) * sizeof(struct device));
ret[numdevices] = new;
ret[numdevices+1] = NULL;