Re: [PATCH 2/2] qemu: Convert some APIs to use qemuDomObjFromDomain

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

 



On 13.12.2012 14:23, Peter Krempa wrote:
> On 12/13/12 12:40, Michal Privoznik wrote:
>> Many internal qemu APIs must find domain object from passed
>> virDomainPtr. And with function Peter's introduced, we can use it
>> instead of copying multiple lines among code.
>> ---
>>   src/qemu/qemu_driver.c |  470
>> +++++-------------------------------------------
>>   1 files changed, 47 insertions(+), 423 deletions(-)
>>
>> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
>> index 74e442b..8ace5c2 100644
>> --- a/src/qemu/qemu_driver.c
>> +++ b/src/qemu/qemu_driver.c
> 
> [...]
> 
>> @@ -3280,22 +3174,13 @@ cleanup:
>>   static int
>>   qemuDomainHasManagedSaveImage(virDomainPtr dom, unsigned int flags)
>>   {
>> -    virQEMUDriverPtr driver = dom->conn->privateData;
>>       virDomainObjPtr vm = NULL;
>>       int ret = -1;
>>
>>       virCheckFlags(0, -1);
>>
>> -    qemuDriverLock(driver);
>> -    vm = virDomainFindByUUID(&driver->domains, dom->uuid);
>> -    qemuDriverUnlock(driver);
>> -    if (!vm) {
>> -        char uuidstr[VIR_UUID_STRING_BUFLEN];
>> -        virUUIDFormat(dom->uuid, uuidstr);
>> -        virReportError(VIR_ERR_NO_DOMAIN,
>> -                       _("no domain with matching uuid '%s'"), uuidstr);
>> +    if (!(vm = qemuDomObjFromDomain(dom)))
>>           goto cleanup;
>> -    }
>>
>>       ret = vm->hasManagedSave;
> 
> Again, this hunk is already changed upstream.
> 
>>
> 
> ACK if you rebase this on the current upstream head and thus get rid of
> the hunk above.
> 
> Peter
> 

Thanks, I've rebased both patches. Seems like our git is changing so
fast that I need to pull every day not every two days :).
Morover, I'll hold pushing this till 24th - it's gonna be a small
Christmas gift to libvirt from me :)

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]