X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=ui%2Fncurses%2Fnc-sysinfo.c;h=8252b4529586329fe99da95c06f04dfe50dbf281;hp=bde8b331ce2b05fbe9ced376f5736fd31a78226f;hb=11c43508e4360456298a6dcb0563614e9a118b41;hpb=73ee21af6d0a379a104a21b7569331284b3659b7 diff --git a/ui/ncurses/nc-sysinfo.c b/ui/ncurses/nc-sysinfo.c index bde8b33..8252b45 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); @@ -64,6 +65,38 @@ static void sysinfo_screen_populate(struct sysinfo_screen *screen, line("%-12s %s", _("System type:"), sysinfo->type ?: ""); line("%-12s %s", _("System id:"), sysinfo->identifier ?: ""); + if (sysinfo->n_primary) { + line(NULL); + line("%s", _("Primary platform versions:")); + for (i = 0; i < sysinfo->n_primary; i++) { + line("\t%s", sysinfo->platform_primary[i] ?: ""); + } + } + + if (sysinfo->n_other) { + line(NULL); + line("%s", _("Alternate platform versions:")); + for (i = 0; i < sysinfo->n_other; i++) { + line("\t%s", sysinfo->platform_other[i] ?: ""); + } + } + + if (sysinfo->n_bmc_current) { + line(NULL); + line("%s", _("BMC current side:")); + for (i = 0; i < sysinfo->n_bmc_current; i++) { + line("\t%s", sysinfo->bmc_current[i] ?: ""); + } + } + + if (sysinfo->n_bmc_golden) { + line(NULL); + line("%s", _("BMC golden side:")); + for (i = 0; i < sysinfo->n_bmc_golden; i++) { + line("\t%s", sysinfo->bmc_golden[i] ?: ""); + } + } + if (sysinfo->n_blockdevs) { line(NULL); line(_("Storage devices")); @@ -78,6 +111,13 @@ static void sysinfo_screen_populate(struct sysinfo_screen *screen, line(NULL); } + if (sysinfo->bmc_mac) { + line(NULL); + 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,15 +125,15 @@ 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)); line("%s:", info->name); - line(_(" MAC: %s"), macbuf); + line(_(" MAC: %s"), macbuf); + line(_(" IP Address: %s"), info->address ?: _("none")); /* TRANSLATORS: these "up" / "down" strings refer to the * link status for a network connection. */ - line(_(" link: %s"), info->link ? _("up") : _("down")); + line(_(" link: %s"), info->link ? _("up") : _("down")); line(NULL); } @@ -104,7 +144,11 @@ void sysinfo_screen_update(struct sysinfo_screen *screen, const struct system_info *sysinfo) { sysinfo_screen_populate(screen, sysinfo); - text_screen_draw(&screen->text_scr); + + if (screen->text_scr.cui->help_screen) + screen->text_scr.need_update = true; + else + text_screen_draw(&screen->text_scr); } struct sysinfo_screen *sysinfo_screen_init(struct cui *cui,