[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
- From: Matthias Bolte <matthias bolte googlemail com>
- To: "Daniel P. Berrange" <berrange redhat com>
- Cc: libvir-list redhat com
- Subject: Re: [libvirt] [PATCH] Don't exist if the libvirtd config does not exist
- Date: Fri, 8 Jul 2011 16:34:18 +0200
2011/7/8 Daniel P. Berrange <berrange redhat com>:
> 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.
>
> * daemon/libvirtd.c: Treat ENOENT as non-fatal when loading
> config
> ---
> daemon/libvirtd.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c
> index 06d2077..fe0fa27 100644
> --- a/daemon/libvirtd.c
> +++ b/daemon/libvirtd.c
> @@ -1028,6 +1028,10 @@ daemonConfigLoad(struct daemonConfig *data,
> {
> virConfPtr conf;
>
> + if (access(filename, R_OK) == -1 &&
> + errno == ENOENT)
> + return 0;
> +
> conf = virConfReadFile (filename, 0);
> if (!conf)
> return -1;
s/Don't exist/Don't exit/ typo in subject.
ACK, qemu:///session is working again.
--
Matthias Bolte
http://photron.blogspot.com
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]