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

[libvirt] [PATCH 1/4] Make vshDebug work when parsing parameters



The vshInit initializes ctl->debug by which vshDebug (which is also
called in vshParseArgv) decides whether to print out the message or
not.

Signed-off-by: Martin Kletzander <mkletzan redhat com>
---
 tools/virsh.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/tools/virsh.c b/tools/virsh.c
index d822e09..9ed038a 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -3100,15 +3100,13 @@ 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)) {
-        vshDeinit(ctl);
+    if (!vshParseArgv(ctl, argc, argv))
         exit(EXIT_FAILURE);
-    }

     if (!ctl->imode) {
         ret = vshCommandRun(ctl, ctl->cmd);
-- 
1.8.1.5


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