]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
Make vshDebug work when parsing parameters
authorMartin Kletzander <mkletzan@redhat.com>
Wed, 13 Mar 2013 08:03:34 +0000 (09:03 +0100)
committerMartin Kletzander <mkletzan@redhat.com>
Fri, 15 Mar 2013 14:05:44 +0000 (15:05 +0100)
The vshInit initializes ctl->debug by which vshDebug (which is also
called in vshParseArgv) decides whether to print out the message or
not.

tools/virsh.c

index d822e09415cacfaf3a60d383090208875a501dac..58a604baf6beda87550dd9a340868fde61cb9399 100644 (file)
@@ -3100,12 +3100,12 @@ main(int argc, char **argv)
         ctl->name = vshStrdup(ctl, defaultConn);
     }
 
-    if (!vshParseArgv(ctl, argc, argv)) {
+    if (!vshInit(ctl)) {
         vshDeinit(ctl);
         exit(EXIT_FAILURE);
     }
 
-    if (!vshInit(ctl)) {
+    if (!vshParseArgv(ctl, argc, argv)) {
         vshDeinit(ctl);
         exit(EXIT_FAILURE);
     }