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

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



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


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