]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virsh: Fix virsh prompt when connection changes to readonly mode.
authorJulio Faracco <jcfaracco@gmail.com>
Mon, 27 Nov 2017 00:18:11 +0000 (22:18 -0200)
committerErik Skultety <eskultet@redhat.com>
Mon, 27 Nov 2017 09:12:30 +0000 (10:12 +0100)
commit13d45b0dc25ed99a9da0704d01cf21c8fe99f951
treeffa23970a3e0fbb936cf83de2dbeacb7a95e2307
parent8ed2b6300ba9e0e49faebb07dc2d7d1cbb38b0b8
virsh: Fix virsh prompt when connection changes to readonly mode.

This commit fixes the virsh prompt when reconnection to the same URI is
called: `virsh # connect --readonly` (Reconnect). The problem is
happening because the code is considering URI (name) as a mandatory
parameter to change the prompt. This commit remove the assignment into
`priv->readonly` from `if (name)` conditional.

Before:
    virsh # uri
    qemu:///system

    virsh # connect --readonly

    virsh #

After:
    virsh # uri
    qemu:///system

    virsh # connect --readonly

    virsh >

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1507737

Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
tools/virsh.c