ffbafd4 qemu: Avoid using ".(null)" in UNIX socket path

Authored and Committed by Jiri Denemark 8 years ago
    qemu: Avoid using ".(null)" in UNIX socket path
    
    The code which generates paths for UNIX socket blindly used target name
    without checking if it was set. Thus for the following device XML
    
        <channel type='unix'>
          <source mode='bind'/>
          <target type='virtio'/>
        </channel>
    
    we would generate "/var/lib/libvirt/qemu/channel/target/NAME.(null)"
    path which works but is not really correct. Let's not use the
    ".target_name" suffix at all if target name is not set.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1226854
    
    Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
    
        
file modified
+16 -4
file modified
+5 -0