Re: [PATCH 1/2] storage: pool: Fix handling of errors on pool lookup failure

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

 



On 06/11/14 17:12, Ján Tomko wrote:
> On 06/05/2014 01:52 PM, Peter Krempa wrote:
>> Rework internal pool lookup code to avoid printing the raw UUID buffer
>> in the case a storage pool can't be found:
>>
>>  $ virsh pool-name e012ace0-0460-5810-39ef-1bce5fa5a4dd
>>  error: failed to get pool 'e012ace0-0460-5810-39ef-1bce5fa5a4dd'
>>  error: Storage pool not found: no storage pool with matching uuid à¬à`X9ï_¥¤Ý
>>
>> The rework is mostly done by switching the lookup code to the newly
>> introduced helper virStoragePoolObjFromStoragePoo
> 
> *Pool
> 
>>
>> Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1104993
>> ---
>>  src/storage/storage_driver.c | 263 +++++++++++++++----------------------------
>>  1 file changed, 90 insertions(+), 173 deletions(-)
> 
> ACK
> 
>>
>> diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c
>> index 4f51517..c9916ff 100644
>> --- a/src/storage/storage_driver.c
>> +++ b/src/storage/storage_driver.c
>> @@ -287,8 +289,7 @@ storagePoolLookupByUUID(virConnectPtr conn,
>>                              NULL, NULL);
>>
>>   cleanup:
>> -    if (pool)
>> -        virStoragePoolObjUnlock(pool);
>> +    virStoragePoolObjUnlock(pool);
> 
> But IMO it would look neater with these no-op changes separated.

I've separated these cleanups into a separate patch and pushed both of
those.

> 
> Jan
> 

Peter

Attachment: signature.asc
Description: OpenPGP digital signature

--
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]