]> 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)
committerCole Robinson <crobinso@redhat.com>
Sun, 9 Dec 2012 21:34:13 +0000 (16:34 -0500)
commit179216680ed2a02053983f31c374ef55489b9f5a
tree434678280ae03c9277daaa0f6512c3876fe05aea
parentadc0bc4c1d6e241ad31de30e4adda3cb13478690
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.
(cherry picked from commit 03cd6e4ae8d86682986249f05f7de8eb405a12da)
src/conf/domain_conf.c
src/qemu/qemu_command.c