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

[WIP PATCH 07/16] tools/xl: Sort list command options



Simply a minor housekeeping task.  Unfortunately no single order really
dominates.  Some spots use the option name, some the option letter.

Signed-off-by: Elliott Mitchell <ehem+xen@xxxxxxx>
---
 tools/xl/xl_cmdtable.c |  4 ++--
 tools/xl/xl_list.c     | 22 +++++++++++-----------
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/tools/xl/xl_cmdtable.c b/tools/xl/xl_cmdtable.c
index 6ab5e47da3..6a05bf7ce2 100644
--- a/tools/xl/xl_cmdtable.c
+++ b/tools/xl/xl_cmdtable.c
@@ -53,11 +53,11 @@ struct cmd_spec cmd_table[] = {
       &main_list, 0, 0,
       "List information about all/some domains",
       "[options] [Domain]\n",
-      "-l, --long              Output all VM details\n"
-      "-v, --verbose           Prints out UUIDs and security context\n"
       "-Z, --context           Prints out security context\n"
       "-c, --cpupool           Prints the cpupool the domain is in\n"
+      "-l, --long              Output all VM details\n"
       "-n, --numa              Prints out NUMA node affinity"
+      "-v, --verbose           Prints out UUIDs and security context\n"
     },
     { "destroy",
       &main_destroy, 0, 1,
diff --git a/tools/xl/xl_list.c b/tools/xl/xl_list.c
index ac6a9e5eac..8b391a9056 100644
--- a/tools/xl/xl_list.c
+++ b/tools/xl/xl_list.c
@@ -129,17 +129,17 @@ static void list_domains(bool verbose, bool context, bool 
claim, bool numa,
 int main_list(int argc, char **argv)
 {
     int opt;
-    bool verbose = false;
     bool context = false;
-    bool details = false;
     bool cpupool = false;
+    bool details = false;
     bool numa = false;
+    bool verbose = false;
     static struct option opts[] = {
-        {"long", 0, 0, 'l'},
-        {"verbose", 0, 0, 'v'},
         {"context", 0, 0, 'Z'},
         {"cpupool", 0, 0, 'c'},
+        {"long", 0, 0, 'l'},
         {"numa", 0, 0, 'n'},
+        {"verbose", 0, 0, 'v'},
         COMMON_LONG_OPTS
     };
 
@@ -147,22 +147,22 @@ int main_list(int argc, char **argv)
     libxl_dominfo *info, *info_free=0;
     int nb_domain, rc;
 
-    SWITCH_FOREACH_OPT(opt, "lvhZcn", opts, "list", 0) {
-    case 'l':
-        details = true;
-        break;
-    case 'v':
-        verbose = true;
-        break;
+    SWITCH_FOREACH_OPT(opt, "Zchlnv", opts, "list", 0) {
     case 'Z':
         context = true;
         break;
     case 'c':
         cpupool = true;
         break;
+    case 'l':
+        details = true;
+        break;
     case 'n':
         numa = true;
         break;
+    case 'v':
+        verbose = true;
+        break;
     }
 
     libxl_dominfo_init(&info_buf);
-- 


-- 
(\___(\___(\______          --=> 8-) EHM <=--          ______/)___/)___/)
 \BS (    |         ehem+sigmsg@xxxxxxx  PGP 87145445         |    )   /
  \_CS\   |  _____  -O #include <stddisclaimer.h> O-   _____  |   /  _/
8A19\___\_|_/58D2 7E3D DDF4 7BA6 <-PGP-> 41D1 B375 37D0 8714\_|_/___/5445






 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.