summaryrefslogtreecommitdiffstats
path: root/tests/xml/fake_libvirt_xml.c
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-05-03 12:25:54 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-05-03 12:30:05 +0100
commitf072a21f3aef6779aaa77329578ae3677a685d85 (patch)
treee06171c39af7e1576bb1fb18a200d5c1de682a11 /tests/xml/fake_libvirt_xml.c
parent66a525ce5a4e95fb8576ea183e06e1eb730a135d (diff)
downloadlibguestfs-f072a21f3aef6779aaa77329578ae3677a685d85.tar.gz
libguestfs-f072a21f3aef6779aaa77329578ae3677a685d85.tar.xz
libguestfs-f072a21f3aef6779aaa77329578ae3677a685d85.zip
perl: Don't fail if 'type' (disk format) attribute is missing in libvirt XML (RHBZ#701814).
Old versions of libvirt allowed you to define disks like this: <disk type='file' device='disk'> <driver name='qemu'/> ... Since the <driver> element does not have a 'type' attribute (which defines the format), we are supposed to do autodetection, so the format should be undefined. However what actually happened was that the code in Sys::Guestfs::Lib::open_guest received format as an empty string from the xpath query, causing libguestfs to give an error. If the xpath query returns the format as an empty string, undefine it.
Diffstat (limited to 'tests/xml/fake_libvirt_xml.c')
0 files changed, 0 insertions, 0 deletions