Skip to contentSkip to conversation

vl.c: Increase width of machine name column in "-M ?" output

PATCH Applied Peter Maydell 2 participants 2 messages Feb 22, 2012 – Feb 23, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vl.c: Increase width of machine name column in "-M ?" output

Increase the width of the column used for the machine name in the "-M ?" output from 10 to 20 spaces. This fixes the formatting so it looks nice for architectures where a few of the machines have overly long names. (Our current longest machine name is "petalogix-s3adsp1800" with "realview-eb-mpcore" not far behind.)

---
 vl.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
vl.c +2 -2
index 7a8cc08..f211c71 100644
@@ -1999,9 +1999,9 @@ static QEMUMachine *machine_parse(const char *name)
     printf("Supported machines are:\n");
     for (m = first_machine; m != NULL; m = m->next) {
         if (m->alias) {
-            printf("%-10s %s (alias of %s)\n", m->alias, m->desc, m->name);
+            printf("%-20s %s (alias of %s)\n", m->alias, m->desc, m->name);
         }
-        printf("%-10s %s%s\n", m->name, m->desc,
+        printf("%-20s %s%s\n", m->name, m->desc,
                m->is_default ? " (default)" : "");
     }
     exit(!name || *name != '?');
Signature · 1 line
1.7.5.4
#1 lore raw
Quoted 10 lines · Peter Maydell

Increase the width of the column used for the machine name in the "-M ?" output from 10 to 20 spaces. This fixes the formatting so it looks nice for architectures where a few of the machines have overly long names. (Our current longest machine name is "petalogix-s3adsp1800" with "realview-eb-mpcore" not far behind.)

---
 vl.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Confirmed that libvirt does not depend on the spacing.

Thanks, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches

Stefan