ui/ncurses: Add block devices to system info screen
authorJeremy Kerr <jk@ozlabs.org>
Fri, 15 Nov 2013 04:56:39 +0000 (15:56 +1100)
committerJeremy Kerr <jk@ozlabs.org>
Fri, 22 Nov 2013 02:45:54 +0000 (10:45 +0800)
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
ui/ncurses/nc-sysinfo.c

index 4cba9a9c393cfaa9ac83b232d1c5ec55ffe72cbb..1d7bd1e2834cf8b499517a8320be44dcb68529f0 100644 (file)
@@ -167,9 +167,24 @@ static void sysinfo_screen_populate(struct sysinfo_screen *screen,
        line("%-12s %s", "System type:", sysinfo->type ?: "");
        line("%-12s %s", "System id:",   sysinfo->identifier ?: "");
 
-       line(NULL);
-       if (sysinfo->n_interfaces)
+       if (sysinfo->n_blockdevs) {
+               line(NULL);
+               line("Storage devices");
+       }
+
+       for (i = 0; i < sysinfo->n_blockdevs; i++) {
+               struct blockdev_info *info = sysinfo->blockdevs[i];
+
+               line("%s:", info->name);
+               line(" UUID:       %s", info->uuid);
+               line(" mounted at: %s", info->mountpoint);
+               line(NULL);
+       }
+
+       if (sysinfo->n_interfaces) {
+               line(NULL);
                line("Network interfaces");
+       }
 
        for (i = 0; i < sysinfo->n_interfaces; i++) {
                struct interface_info *info = sysinfo->interfaces[i];