This way they make sense not only based on where they are located but
the name also relates to what they are actually doing.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
src/qemu/qemu_command.c | 5 +++--
src/qemu/qemu_domain.c | 22 +++++++++++-----------
src/qemu/qemu_domain.h | 6 +++---
src/qemu/qemu_process.c | 3 ++-
4 files changed, 19 insertions(+), 17 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 167ee8240b22..a0c9e5f8b399 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -3222,7 +3222,8 @@ qemuBuildMemoryBackendProps(virJSONValue **backendProps,
} else {
/* We can have both pagesize and mem source. If that's the case,
* prefer hugepages as those are more specific. */
- if (qemuGetMemoryBackingPath(priv, mem->info.alias, &memPath) < 0)
+ if (qemuDomainGetMemoryBackingPath(priv, mem->info.alias,
+ &memPath) < 0)
return -1;
}
@@ -7116,7 +7117,7 @@ qemuBuildMemPathStr(const virDomainDef *def,
return -1;
prealloc = true;
} else if (def->mem.source == VIR_DOMAIN_MEMORY_SOURCE_FILE) {
- if (qemuGetMemoryBackingPath(priv, "ram", &mem_path) < 0)
+ if (qemuDomainGetMemoryBackingPath(priv, "ram", &mem_path) < 0)
return -1;
}
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index a92eaef80af0..49318f518788 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -1736,9 +1736,9 @@ qemuDomainSecretPrepare(virQEMUDriver *driver,
static int
-qemuGetMemoryBackingDomainPath(qemuDomainObjPrivate *priv,
- const virDomainDef *def,
- char **path)
+qemuDomainGenerateMemoryBackingPath(qemuDomainObjPrivate *priv,
+ const virDomainDef *def,
+ char **path)
{
virQEMUDriver *driver = priv->driver;
g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver);
@@ -1760,7 +1760,7 @@ qemuGetMemoryBackingDomainPath(qemuDomainObjPrivate *priv,
/**
- * qemuGetMemoryBackingPath:
+ * qemuDomainGetMemoryBackingPath:
* @priv: domain private data
* @alias: memory object alias
* @memPath: constructed path
@@ -1771,9 +1771,9 @@ qemuGetMemoryBackingDomainPath(qemuDomainObjPrivate *priv,
* -1 otherwise (with error reported).
*/
int
-qemuGetMemoryBackingPath(qemuDomainObjPrivate *priv,
- const char *alias,
- char **memPath)
+qemuDomainGetMemoryBackingPath(qemuDomainObjPrivate *priv,
+ const char *alias,
+ char **memPath)
{
if (!alias) {
/* This should never happen (TM) */
@@ -1804,8 +1804,8 @@ qemuDomainSetPrivatePathsOld(virQEMUDriver *driver,
cfg->channelTargetDir,
vm->def->name);
if (!priv->memoryBackingDir &&
- qemuGetMemoryBackingDomainPath(priv, vm->def,
- &priv->memoryBackingDir) < 0)
+ qemuDomainGenerateMemoryBackingPath(priv, vm->def,
+ &priv->memoryBackingDir) < 0)
return -1;
return 0;
@@ -1831,8 +1831,8 @@ qemuDomainSetPrivatePaths(virQEMUDriver *driver,
cfg->channelTargetDir, domname);
if (!priv->memoryBackingDir &&
- qemuGetMemoryBackingDomainPath(priv, vm->def,
- &priv->memoryBackingDir) < 0)
+ qemuDomainGenerateMemoryBackingPath(priv, vm->def,
+ &priv->memoryBackingDir) < 0)
return -1;
return 0;
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index cb42577ee51a..ba357af8f4b6 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -939,9 +939,9 @@ void qemuDomainCleanupStorageSourceFD(virStorageSource *src);
void qemuDomainStartupCleanup(virDomainObj *vm);
-int qemuGetMemoryBackingPath(qemuDomainObjPrivate *priv,
- const char *alias,
- char **memPath);
+int qemuDomainGetMemoryBackingPath(qemuDomainObjPrivate *priv,
+ const char *alias,
+ char **memPath);
int qemuDomainSecretPrepare(virQEMUDriver *driver,
virDomainObj *vm)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index dd3afbeb39ac..a00066e88ed2 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -4110,7 +4110,8 @@ qemuProcessDestroyMemoryBackingPath(virDomainObj *vm,
{
g_autofree char *path = NULL;
- if (qemuGetMemoryBackingPath(QEMU_DOMAIN_PRIVATE(vm), mem->info.alias, &path)
< 0)
+ if (qemuDomainGetMemoryBackingPath(QEMU_DOMAIN_PRIVATE(vm),
+ mem->info.alias, &path) < 0)
return -1;
if (unlink(path) < 0 &&
--
2.46.1