The construction is implemented in qemuDomainSetPrivateMemPath() already and saved and used only using priv->memoryBackingDir. Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx> --- src/qemu/qemu_domain.c | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index daec89fca1db..f7c06cee1861 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -13184,30 +13184,6 @@ qemuDomainStorageUpdatePhysical(virQEMUDriverConfig *cfg, } -int -qemuGetMemoryBackingDomainPath(qemuDomainObjPrivate *priv, - const virDomainDef *def, - char **path) -{ - virQEMUDriver *driver = priv->driver; - g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver); - const char *root = driver->embeddedRoot; - g_autofree char *shortName = NULL; - - if (!(shortName = virDomainDefGetShortName(def))) - return -1; - - if (root && !STRPREFIX(cfg->memoryBackingDir, root)) { - g_autofree char * hash = virDomainDriverGenerateRootHash("qemu", root); - *path = g_strdup_printf("%s/%s-%s", cfg->memoryBackingDir, hash, shortName); - } else { - *path = g_strdup_printf("%s/%s", cfg->memoryBackingDir, shortName); - } - - return 0; -} - - /** * qemuGetMemoryBackingPath: * @priv: domain private data -- 2.46.0