be6a415 qemu: set bind mode for chardev while parsing XML

Authored and Committed by phrdina 6 years ago
    qemu: set bind mode for chardev while parsing XML
    
    Currently while parsing domain XML we clear the UNIX path if it matches
    one of the auto-generated paths by libvirt.  After that when the guest
    is started new path is generated but the mode is also changed to "bind".
    
    In the real-world use-case the mode should not change, it only happens
    if a user provides a mode='connect' and path that matches one of the
    auto-generated path or not provides a path at all.
    
    Before *reconnect* feature was introduced there was no issue, but with
    the new feature we need to make sure that it's used only with "connect"
    mode, therefore we need to move the mode change into parsing in order
    to have a proper error reported by validation code.
    
    Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
    
        
file modified
+10 -3
file modified
+3 -0