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

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



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 redhat com>
>>
>> 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 redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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