mirror of https://gitee.com/openkylin/libvirt.git
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:
parent
627595641d
commit
f78c3dde57
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue