summaryrefslogtreecommitdiffstats
path: root/ui/ncurses
diff options
context:
space:
mode:
authorJack Miller <jack@codezen.org>2015-12-09 12:03:24 -0600
committerJack Miller <jack@codezen.org>2015-12-15 12:33:48 -0600
commitcecbe53013e9ed85fd5b2429c230759d59025644 (patch)
tree06e2cab4d15486b4fbd663411228d80d4d71989c /ui/ncurses
parent2983a122b09ace8de8be19a3e3566aa5deb09b81 (diff)
downloadpetitboot-cecbe53013e9ed85fd5b2429c230759d59025644.zip
petitboot-cecbe53013e9ed85fd5b2429c230759d59025644.tar.gz
Add BMC interface MAC to system info output
Useful for identifying the initial BMC traffic on the network. Signed-off-by: Jack Miller <jack@codezen.org>
Diffstat (limited to 'ui/ncurses')
-rw-r--r--ui/ncurses/nc-sysinfo.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/ui/ncurses/nc-sysinfo.c b/ui/ncurses/nc-sysinfo.c
index ac8ece7..5ced871 100644
--- a/ui/ncurses/nc-sysinfo.c
+++ b/ui/ncurses/nc-sysinfo.c
@@ -51,6 +51,7 @@ static void if_info_mac_str(struct interface_info *info,
static void sysinfo_screen_populate(struct sysinfo_screen *screen,
const struct system_info *sysinfo)
{
+ char macbuf[32];
unsigned int i;
text_screen_clear(&screen->text_scr);
@@ -78,6 +79,12 @@ static void sysinfo_screen_populate(struct sysinfo_screen *screen,
line(NULL);
}
+ if (sysinfo->bmc_mac) {
+ mac_str(sysinfo->bmc_mac, HWADDR_SIZE, macbuf, sizeof(macbuf));
+ line(_("Management (BMC) interface"));
+ line(_(" MAC: %s"), macbuf);
+ }
+
if (sysinfo->n_interfaces) {
line(NULL);
line(_("Network interfaces"));
@@ -85,7 +92,6 @@ static void sysinfo_screen_populate(struct sysinfo_screen *screen,
for (i = 0; i < sysinfo->n_interfaces; i++) {
struct interface_info *info = sysinfo->interfaces[i];
- char macbuf[32];
if_info_mac_str(info, macbuf, sizeof(macbuf));
OpenPOWER on IntegriCloud