[PATCH] virsh: Make 'exit' action same as 'quit'

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

 



From: Li Yang <liyang.fnst@xxxxxxxxxxxxxx>

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@xxxxxxxxxxxxxx>
---
 tools/virsh.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/tools/virsh.c b/tools/virsh.c
index 02835d9..da7fedd 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) {
-- 
1.7.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]