From: Martin Kletzander Date: Wed, 13 Mar 2013 08:03:34 +0000 (+0100) Subject: Make vshDebug work when parsing parameters X-Git-Tag: v1.0.4-rc1~85 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=abfff210060625af8914e28601f1ec6ed96b05ae;p=thirdparty%2Flibvirt.git 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. --- diff --git a/tools/virsh.c b/tools/virsh.c index d822e09415..58a604baf6 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -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); }