From: Li Yang Date: Wed, 2 Apr 2014 08:43:03 +0000 (+0800) Subject: virsh: Make 'exit' action same as 'quit' X-Git-Tag: v1.2.4-rc1~191 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc7e1503598446224b28e326da1398da493d9a0a;p=thirdparty%2Flibvirt.git virsh: Make 'exit' action same as 'quit' For now 'virsh quit' action like this: -------------------------------- [root@localhost /]# virsh quit [root@localhost /]# -------------------------------- And 'virsh exit' action: -------------------------------- [root@localhost /]# virsh exit [root@localhost /]# -------------------------------- There is a small difference('/n') between them. According to manual said: quit, exit quit this interactive terminal And in the code they all called cmdQuit func, They should get same actions. Signed-off-by: Li Yang --- diff --git a/tools/virsh.c b/tools/virsh.c index f2e4c4a47d..28af3c36e2 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -1852,7 +1852,8 @@ vshCommandRun(vshControl *ctl, const vshCmd *cmd) if (!ret && disconnected != 0) vshReconnect(ctl); - if (STREQ(cmd->def->name, "quit")) /* hack ... */ + if (STREQ(cmd->def->name, "quit") || + STREQ(cmd->def->name, "exit")) /* hack ... */ return ret; if (enable_timing) {