[libvirt] [PATCH] qemu: conf: Run through the parser even without config file

The parser sets a few defaults if the are not present in the config. We should run that even when the file is missing. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1325075 --- src/qemu/qemu_conf.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 77ef4fe..0bd9f06 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -477,12 +477,11 @@ int virQEMUDriverConfigLoadFile(virQEMUDriverConfigPtr cfg, */ if (access(filename, R_OK) == -1) { VIR_INFO("Could not read qemu config file %s", filename); - return 0; + } else { + if (!(conf = virConfReadFile(filename, 0))) + goto cleanup; } - if (!(conf = virConfReadFile(filename, 0))) - goto cleanup; - #define CHECK_TYPE(name, typ) \ if (p && p->type != (typ)) { \ virReportError(VIR_ERR_INTERNAL_ERROR, \ -- 2.8.1

On Wed, Apr 27, 2016 at 03:39:59PM +0200, Peter Krempa wrote:
The parser sets a few defaults if the are not present in the config. We should run that even when the file is missing.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1325075
Those default should be set in virQEMUDriverConfigNew. We're simply missing a setting of cfg->stdioLogD = true in that method Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
participants (2)
-
Daniel P. Berrange
-
Peter Krempa