Re: [PATCH] qemuDomainObjStart: Warn on corrupted image

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11.11.2013 17:07, Jiri Denemark wrote:
> On Mon, Nov 11, 2013 at 16:48:07 +0100, Michal Privoznik wrote:
>> If the managedsave image is corrupted, e.g. the XML part is, we fail to
>> parse it and throw an error, e.g.:
>>
>> error: Failed to start domain jms8
>> error: XML error: missing security model when using multiple labels
>>
>> This is okay, as we can't really start the machine and avoid undefined
>> qemu behaviour. On the other hand, the error message doesn't give a
>> clue to users what should they do. The consensus here would be to thrown
>> a warning to logs saying "Hey, you've got a corrupted file".
>>
>> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
>> ---
>>  src/qemu/qemu_driver.c | 5 ++++-
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
>> index 9c3daad..08be24b 100644
>> --- a/src/qemu/qemu_driver.c
>> +++ b/src/qemu/qemu_driver.c
>> @@ -6041,8 +6041,11 @@ qemuDomainObjStart(virConnectPtr conn,
>>  
>>              if (ret > 0)
> 
> Should be "if (ret > 0) {"
> 
>>                  VIR_WARN("Ignoring incomplete managed state %s", managed_save);
>> -            else
>> +            else {
> 
> and "} else {" to follow are coding style rules.

Oh, right. Fixed and pushed. Thank you guys.

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]