]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Avoid using ".(null)" in UNIX socket path
authorJiri Denemark <jdenemar@redhat.com>
Tue, 30 Jun 2015 11:34:20 +0000 (13:34 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Wed, 1 Jul 2015 07:47:32 +0000 (09:47 +0200)
commitffbafd4e883900722cbfc68cd9053d4b42eb38fa
tree31641ee8a9448ca280665c70b0ced19dd46df8b1
parent18c9d1578bae7576c0c34c10c9a8ec9e4061d3b2
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>
src/qemu/qemu_domain.c
tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-unix.args [new file with mode: 0644]
tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-unix.xml [new file with mode: 0644]
tests/qemuxml2argvtest.c