From: Ján Tomko Date: Tue, 15 Jan 2019 09:14:44 +0000 (+0100) Subject: qemu_conf: split out virQEMUDriverConfigLoadGlusterDebugEntry X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=fad7036ad432130d743d8bb58cc59ab0cd2159ca;p=libvirt.git qemu_conf: split out virQEMUDriverConfigLoadGlusterDebugEntry Split out parts of the config parsing code to make the parent function easier to read. Signed-off-by: Ján Tomko Reviewed-by: John Ferlan --- diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index a57d1cec29..78b8c42a65 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -423,6 +423,14 @@ virQEMUDriverConfigHugeTLBFSInit(virHugeTLBFSPtr hugetlbfs, } +static int +virQEMUDriverConfigLoadGlusterDebugEntry(virQEMUDriverConfigPtr cfg, + virConfPtr conf) +{ + return virConfGetValueUInt(conf, "gluster_debug_level", &cfg->glusterDebugLevel); +} + + static int virQEMUDriverConfigLoadSecurityEntry(virQEMUDriverConfigPtr cfg, virConfPtr conf, @@ -915,7 +923,8 @@ int virQEMUDriverConfigLoadFile(virQEMUDriverConfigPtr cfg, goto cleanup; } } - if (virConfGetValueUInt(conf, "gluster_debug_level", &cfg->glusterDebugLevel) < 0) + + if (virQEMUDriverConfigLoadGlusterDebugEntry(cfg, conf) < 0) goto cleanup; if (virQEMUDriverConfigLoadSecurityEntry(cfg, conf, privileged) < 0)