[libvirt] [PATCH v2] conf: Report sensible error for invalid disk name

Martin Kletzander mkletzan at redhat.com
Thu Nov 22 14:27:33 UTC 2012


On 11/22/2012 02:16 PM, Peter Krempa wrote:
> On 11/20/12 16:20, Martin Kletzander wrote:
>> 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.
>> ---
>> v2:
>>   - Error moved from virDiskNameToIndex at util/util.c to
>>     virDomainDiskDefAssignAddress at conf/domain_conf.c
>>   - One more error added into qemuParseCommandLine at qemu/qemu_command.c
>>
>>   src/conf/domain_conf.c  | 6 +++++-
>>   src/qemu/qemu_command.c | 6 +++++-
>>   2 files changed, 10 insertions(+), 2 deletions(-)
>>
> 
> ACK.
> 
> Peter
> 

Thanks, pushed.

Martin




More information about the libvir-list mailing list