From cc7e1503598446224b28e326da1398da493d9a0a Mon Sep 17 00:00:00 2001 From: Li Yang Date: Wed, 2 Apr 2014 16:43:03 +0800 Subject: [PATCH] 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 --- tools/virsh.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) { -- GitLab