]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: Report sensible error for invalid disk name
authorMartin Kletzander <mkletzan@redhat.com>
Tue, 20 Nov 2012 13:45:56 +0000 (14:45 +0100)
committerMartin Kletzander <mkletzan@redhat.com>
Thu, 22 Nov 2012 14:23:40 +0000 (15:23 +0100)
commit03cd6e4ae8d86682986249f05f7de8eb405a12da
tree9e07c3bd1a45f568d642e92368eab3c704f86a87
parent89ad205f3211185c22629ac7abd73ca7f4353c91
conf: Report sensible error for invalid disk name

The error "... but the cause is unknown" appeared for XMLs similar to
this:

 <disk type='file' device='cdrom'>
   <driver name='qemu' type='raw'/>
   <source file='/dev/zero'/>
   <target dev='sr0'/>
 </disk>

Notice unsupported disk type (for the driver), but also no address
specified. The first part is not a problem and we should not abort
immediately because of that, but the combination with the address
unknown was causing an unspecified error.

While fixing this, I added an error to one place where this return
value was not managed properly.
src/conf/domain_conf.c
src/qemu/qemu_command.c