[virt-tools-list] [PATCH vhostmd 1/2] vm-dump-metrics: Fix formating or usage function

Jim Fehlig jfehlig at suse.com
Tue Oct 23 22:08:02 UTC 2018


The formatting in the usage function of vm-dump-metrics used a
lot of spaces for whitespace. Replace some occurrences with tabs
and remove others that were causing ugly formatting of help.

Signed-off-by: Jim Fehlig <jfehlig at suse.com>
---
 vm-dump-metrics/main.c | 24 +++++++++---------------
 1 file changed, 9 insertions(+), 15 deletions(-)

diff --git a/vm-dump-metrics/main.c b/vm-dump-metrics/main.c
index f48a615..ebd3867 100644
--- a/vm-dump-metrics/main.c
+++ b/vm-dump-metrics/main.c
@@ -29,24 +29,18 @@
 static void usage(const char *argv0)
 {
 #ifdef WITH_XENSTORE
-   char *options_str = "Options:\n\
-         -v | --verbose         Verbose messages.\n\
-         -d | --dest            Metrics destination file .\n\
-         -b | --vbd             Get metrics from vbd.\n\
-         -x | --xenstore        Get metrics from xenstore.\n";
+   char *options_str = "Options:\n"
+         "\t-v | --verbose         Verbose messages.\n"
+         "\t-d | --dest            Metrics destination file .\n"
+         "\t-b | --vbd             Get metrics from vbd.\n"
+         "\t-x | --xenstore        Get metrics from xenstore.\n";
 #else
-   char *options_str = "Options:\n\
-         -v | --verbose         Verbose messages.\n\
-         -d | --dest            Metrics destination file .\n";
+   char *options_str = "Options:\n"
+         "\t-v | --verbose         Verbose messages.\n"
+         "\t-d | --dest            Metrics destination file .\n";
 #endif
 
-   fprintf (stderr,
-         "\n\
-         Usage:\n\
-         %s [options]\n\
-         \n\
-         %s\n",
-         argv0, options_str);
+   fprintf (stderr, "\nUsage: %s [options]\n\n%s\n", argv0, options_str);
 }
 
 int main(int argc, char *argv[])
-- 
2.18.0




More information about the virt-tools-list mailing list