summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ui/ncurses/nc-config.c9
-rw-r--r--ui/ncurses/nc-sysinfo.c3
2 files changed, 9 insertions, 3 deletions
diff --git a/ui/ncurses/nc-config.c b/ui/ncurses/nc-config.c
index 4eeeff8..6c25260 100644
--- a/ui/ncurses/nc-config.c
+++ b/ui/ncurses/nc-config.c
@@ -471,17 +471,22 @@ static void config_screen_setup_widgets(struct config_screen *screen,
config_screen_network_change, screen);
screen->widgets.iface_l = widget_new_label(set, 0, 0, "Device:");
- screen->widgets.iface_f = widget_new_select(set, 0, 0, 20);
+ screen->widgets.iface_f = widget_new_select(set, 0, 0, 50);
for (i = 0; i < sysinfo->n_interfaces; i++) {
struct interface_info *info = sysinfo->interfaces[i];
+ char str[50], mac[20];
bool is_default;
is_default = ifcfg && !memcmp(ifcfg->hwaddr, info->hwaddr,
sizeof(ifcfg->hwaddr));
+ mac_str(info->hwaddr, info->hwaddr_size, mac, sizeof(mac));
+ snprintf(str, sizeof(str), "%s [%s, %s]", info->name, mac,
+ info->link ? "link up" : "link down");
+
widget_select_add_option(screen->widgets.iface_f,
- i, info->name, is_default);
+ i, str, is_default);
}
gw = ip = mask = NULL;
diff --git a/ui/ncurses/nc-sysinfo.c b/ui/ncurses/nc-sysinfo.c
index 142c705..fb1954f 100644
--- a/ui/ncurses/nc-sysinfo.c
+++ b/ui/ncurses/nc-sysinfo.c
@@ -175,7 +175,8 @@ static void sysinfo_screen_populate(struct sysinfo_screen *screen,
if_info_mac_str(info, macbuf, sizeof(macbuf));
line("%s:", info->name);
- line(" MAC: %s", macbuf);
+ line(" MAC: %s", macbuf);
+ line(" link: %s", info->link ? "up" : "down");
line(NULL);
}
OpenPOWER on IntegriCloud