mirror of https://gitee.com/openkylin/libvirt.git
qemu_conf: split out virQEMUDriverConfigLoadMemoryEntry
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
d447293893
commit
6427aca725
|
@ -423,6 +423,14 @@ virQEMUDriverConfigHugeTLBFSInit(virHugeTLBFSPtr hugetlbfs,
|
|||
}
|
||||
|
||||
|
||||
static int
|
||||
virQEMUDriverConfigLoadMemoryEntry(virQEMUDriverConfigPtr cfg,
|
||||
virConfPtr conf)
|
||||
{
|
||||
return virConfGetValueString(conf, "memory_backing_dir", &cfg->memoryBackingDir);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
virQEMUDriverConfigLoadSWTPMEntry(virQEMUDriverConfigPtr cfg,
|
||||
virConfPtr conf)
|
||||
|
@ -892,7 +900,7 @@ int virQEMUDriverConfigLoadFile(virQEMUDriverConfigPtr cfg,
|
|||
}
|
||||
}
|
||||
|
||||
if (virConfGetValueString(conf, "memory_backing_dir", &cfg->memoryBackingDir) < 0)
|
||||
if (virQEMUDriverConfigLoadMemoryEntry(cfg, conf) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (virQEMUDriverConfigLoadSWTPMEntry(cfg, conf) < 0)
|
||||
|
|
Loading…
Reference in New Issue