]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
virsh: Make 'exit' action same as 'quit'
authorLi Yang <liyang.fnst@cn.fujitsu.com>
Wed, 2 Apr 2014 08:43:03 +0000 (16:43 +0800)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 3 Apr 2014 09:57:53 +0000 (11:57 +0200)
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 <liyang.fnst@cn.fujitsu.com>
tools/virsh.c

index f2e4c4a47dcd65b58cb1418c9a457510ca7b4530..28af3c36e294ee6fd4ea100dfd76c56f3eb3ff65 100644 (file)
@@ -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) {