提交 384dde55 编写于 作者: R Roman Bogorodskiy

virsh: re-fix help printing without connection

Re-do 0217089b so it does not add regression for commit c0726e07 that allowed to
print help without making a connection to the daemon.
上级 ed5c9297
......@@ -962,14 +962,16 @@ main(int argc, char **argv)
if (!vshInit(ctl, cmdGroups, NULL))
exit(EXIT_FAILURE);
ctl->connname = vshStrdup(ctl, virGetEnvBlockSUID("VIRSH_DEFAULT_CONNECT_URI"));
if (!virshParseArgv(ctl, argc, argv) ||
!virshInit(ctl)) {
virshDeinit(ctl);
exit(EXIT_FAILURE);
}
if (!ctl->connname)
ctl->connname = vshStrdup(ctl,
virGetEnvBlockSUID("VIRSH_DEFAULT_CONNECT_URI"));
if (!ctl->imode) {
ret = vshCommandRun(ctl, ctl->cmd);
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册