From cecbe53013e9ed85fd5b2429c230759d59025644 Mon Sep 17 00:00:00 2001 From: Jack Miller Date: Wed, 9 Dec 2015 12:03:24 -0600 Subject: Add BMC interface MAC to system info output Useful for identifying the initial BMC traffic on the network. Signed-off-by: Jack Miller --- ui/ncurses/nc-sysinfo.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'ui/ncurses') 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)); -- cgit v1.2.1