Re: [PATCH 3/3] cleanup: Kill usage of access(PATH, F_OK) in favor of virFileExists()

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

 



On 09/13/13 17:31, Martin Kletzander wrote:
> On 09/13/2013 04:19 PM, Peter Krempa wrote:
>> Semantics of the libvirt helper are more clear. This change also allows
>> to clean up some pieces of code.
>> ---

[...]

>> diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.c
>> index d305b06..956cfce 100644
>> --- a/src/storage/storage_backend_fs.c
>> +++ b/src/storage/storage_backend_fs.c
>> @@ -503,7 +503,7 @@ virStorageBackendFileSystemCheck(virConnectPtr conn ATTRIBUTE_UNUSED,
>>  {
>>      *isActive = false;
>>      if (pool->def->type == VIR_STORAGE_POOL_DIR) {
>> -        if (access(pool->def->target.path, F_OK) == 0)
>> +        if (virFileExists(pool->def->target.path))
>>              *isActive = true;
> 
> Why didn't you use the same (nicer) way here, when you used it
> everywhere else.  I'm talking about '*isActive = virFileExists(...)'.
> 
> ACK either way, looking forward to [12]/3 ;-)
> 
> Martin
> 
> P.S.: If you'll need the answer urgently, ping me and I'll see them in
> the archives.
> 

I cleaned up the part you've pointed out and pushed this patch.

Thanks

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]