Re: [PATCH] Don't exist if the libvirtd config does not exist

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

 



On 07/08/2011 10:07 AM, Eric Blake wrote:
> On 07/08/2011 08:28 AM, Daniel P. Berrange wrote:
>> From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
>>
>> It is common for the $HOME/.libvirt/libvirtd.conf file to not
>> exist. Treat this situation as non-fatal since we can carry
>> on with our default settings just fine.
>>

>>  
>> +    if (access(filename, R_OK) == -1 &&
>> +        errno == ENOENT)
>> +        return 0;
>> +
> 
> This patch breaks 'make check' - tests/libvirtd-fail is now reporting
> failure.

That test is checking that an explicit libvirtd --config=no-such-conf
reports failure.

I think the solution to this is to also pass around a bool stating
whether the conf file name was generated by default (ENOENT is okay) or
explicitly passed in (ENOENT must fail).

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

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]