]> xenbits.xensource.com Git - xen.git/commitdiff
xl: fix `xl cpupool-list' behavior in case no pool name is provided
authorDario Faggioli <dario.faggioli@citrix.com>
Wed, 11 Sep 2013 11:06:22 +0000 (13:06 +0200)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 13 Sep 2013 11:50:39 +0000 (12:50 +0100)
since it errors out, asking for at least one argument, and does
not display any useful output, which is wrong (we want the list
and the info about all the existing cpupools).

IOW, the output is as follows:

 ~# xl cpupool-list -c
 'xl cpupool-list' requires at least 1 argument.
 ...

While it should be as follows:

 ~# xl cpupool-list -c
 Name               CPU list
 Pool-0             0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
tools/libxl/xl_cmdimpl.c

index 884f050644244b455c0dd30b1c43d8c89cbe6e09..35b3e290ff76d7a8b51babe88e7409552f8b9d07 100644 (file)
@@ -6570,7 +6570,7 @@ int main_cpupoollist(int argc, char **argv)
     char *name;
     int ret = 0;
 
-    SWITCH_FOREACH_OPT(opt, "hc", opts, "cpupool-list", 1) {
+    SWITCH_FOREACH_OPT(opt, "hc", opts, "cpupool-list", 0) {
     case 'c':
         opt_cpus = 1;
         break;