qemu_conf: split out virQEMUDriverConfigLoadLogEntry

Split out parts of the config parsing code to make
the parent function easier to read.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
Ján Tomko 2019-01-15 10:18:04 +01:00
parent 627595641d
commit f78c3dde57
1 changed files with 9 additions and 1 deletions

View File

@ -423,6 +423,14 @@ virQEMUDriverConfigHugeTLBFSInit(virHugeTLBFSPtr hugetlbfs,
}
static int
virQEMUDriverConfigLoadLogEntry(virQEMUDriverConfigPtr cfg,
virConfPtr conf)
{
return virConfGetValueBool(conf, "log_timestamp", &cfg->logTimestamp);
}
static int
virQEMUDriverConfigLoadNVRAMEntry(virQEMUDriverConfigPtr cfg,
virConfPtr conf)
@ -935,7 +943,7 @@ int virQEMUDriverConfigLoadFile(virQEMUDriverConfigPtr cfg,
goto cleanup;
}
if (virConfGetValueBool(conf, "log_timestamp", &cfg->logTimestamp) < 0)
if (virQEMUDriverConfigLoadLogEntry(cfg, conf) < 0)
goto cleanup;
if (virQEMUDriverConfigLoadNVRAMEntry(cfg, conf) < 0)