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

Michal Privoznik mprivozn at redhat.com
Thu Apr 3 10:09:15 UTC 2014


On 02.04.2014 10:43, liyang wrote:
> From: Li Yang <liyang.fnst at cn.fujitsu.com>
>
> For now 'virsh quit' action like this:
> --------------------------------
> [root at localhost /]# virsh quit
> [root at localhost /]#
> --------------------------------
> And 'virsh exit' action:
> --------------------------------
> [root at localhost /]# virsh exit
>
> [root at 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 at cn.fujitsu.com>
> ---
>   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) {
>

ACKed and pushed. Congratulations on your second libvirt contribution!

Michal




More information about the libvir-list mailing list