[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH] virsh: adjust remaining format strings to avoid emitting trailing space



This may help avoid testing churn and makes the format strings more uniform.

This is identical to yesterday's change,

  http://git.et.redhat.com/?p=libvirt.git;a=commitdiff;h=b285e110625

but applies the same idea to all of the format strings.

>From 2a837515b419cadd1943b3078e5d7b3b116e42ef Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering redhat com>
Date: Tue, 3 Mar 2009 13:28:39 +0100
Subject: [PATCH] virsh: adjust remaining format strings to avoid emitting trailing space

* src/virsh.c (cmdNetworkList, cmdPoolList, cmdVolList): Change
format strings like "%-20s\n" to "%s\n".
---
 src/virsh.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/virsh.c b/src/virsh.c
index 6a257ca..9f143a0 100644
--- a/src/virsh.c
+++ b/src/virsh.c
@@ -2640,7 +2640,7 @@ cmdNetworkList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
         else
             autostartStr = autostart ? "yes" : "no";

-        vshPrint(ctl, "%-20s %-10s %-10s\n",
+        vshPrint(ctl, "%-20s %-10s %s\n",
                  virNetworkGetName(network),
                  _("active"),
                  autostartStr);
@@ -3370,7 +3370,8 @@ cmdPoolList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
             qsort(&inactiveNames[0], maxinactive, sizeof(char*), namesorter);
         }
     }
-    vshPrintExtra(ctl, "%-20s %-10s %-10s\n", _("Name"), _("State"), _("Autostart"));
+    vshPrintExtra(ctl, "%-20s %-10s %s\n",
+                  _("Name"), _("State"), _("Autostart"));
     vshPrintExtra(ctl, "-----------------------------------------\n");

     for (i = 0; i < maxactive; i++) {
@@ -3389,7 +3390,7 @@ cmdPoolList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
         else
             autostartStr = autostart ? "yes" : "no";

-        vshPrint(ctl, "%-20s %-10s %-10s\n",
+        vshPrint(ctl, "%-20s %-10s %s\n",
                  virStoragePoolGetName(pool),
                  _("active"),
                  autostartStr);
@@ -3412,7 +3413,7 @@ cmdPoolList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
         else
             autostartStr = autostart ? "yes" : "no";

-        vshPrint(ctl, "%-20s %-10s %-10s\n",
+        vshPrint(ctl, "%-20s %-10s %s\n",
                  inactiveNames[i],
                  _("inactive"),
                  autostartStr);
@@ -4155,7 +4156,7 @@ cmdVolList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)

         qsort(&activeNames[0], maxactive, sizeof(char *), namesorter);
     }
-    vshPrintExtra(ctl, "%-20s %-40s\n", _("Name"), _("Path"));
+    vshPrintExtra(ctl, "%-20s %s\n", _("Name"), _("Path"));
     vshPrintExtra(ctl, "-----------------------------------------\n");

     for (i = 0; i < maxactive; i++) {
@@ -4174,7 +4175,7 @@ cmdVolList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
         }


-        vshPrint(ctl, "%-20s %-40s\n",
+        vshPrint(ctl, "%-20s %s\n",
                  virStorageVolGetName(vol),
                  path);
         free(path);
--
1.6.2.rc1.285.gc5f54


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]