The name of this function is not very helpful, because it doesn't
create anything, it just flips a bit in a bitmask when domain is
starting up. Move the function internals into qemu_process.c and
forget the function ever existed.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_domain_namespace.c | 14 --------------
src/qemu/qemu_domain_namespace.h | 3 ---
src/qemu/qemu_process.c | 16 +++++++++++++++-
3 files changed, 15 insertions(+), 18 deletions(-)
diff --git a/src/qemu/qemu_domain_namespace.c b/src/qemu/qemu_domain_namespace.c
index 1e54cb2153..ec417edb60 100644
--- a/src/qemu/qemu_domain_namespace.c
+++ b/src/qemu/qemu_domain_namespace.c
@@ -1035,20 +1035,6 @@ qemuDomainBuildNamespace(virQEMUDriverConfigPtr cfg,
}
-int
-qemuDomainCreateNamespace(virQEMUDriverPtr driver,
- virDomainObjPtr vm)
-{
- g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver);
-
- if (virBitmapIsBitSet(cfg->namespaces, QEMU_DOMAIN_NS_MOUNT) &&
- qemuDomainEnableNamespace(vm, QEMU_DOMAIN_NS_MOUNT) < 0)
- return -1;
-
- return 0;
-}
-
-
bool
qemuDomainNamespaceEnabled(virDomainObjPtr vm,
qemuDomainNamespace ns)
diff --git a/src/qemu/qemu_domain_namespace.h b/src/qemu/qemu_domain_namespace.h
index df58462414..0182ce50a2 100644
--- a/src/qemu/qemu_domain_namespace.h
+++ b/src/qemu/qemu_domain_namespace.h
@@ -41,9 +41,6 @@ int qemuDomainBuildNamespace(virQEMUDriverConfigPtr cfg,
virSecurityManagerPtr mgr,
virDomainObjPtr vm);
-int qemuDomainCreateNamespace(virQEMUDriverPtr driver,
- virDomainObjPtr vm);
-
void qemuDomainDestroyNamespace(virQEMUDriverPtr driver,
virDomainObjPtr vm);
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index e368f59b8c..c076dcac3a 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -6640,6 +6640,20 @@ qemuProcessSetupDiskThrottlingBlockdev(virQEMUDriverPtr driver,
}
+static int
+qemuProcessEnableDomainNamespaces(virQEMUDriverPtr driver,
+ virDomainObjPtr vm)
+{
+ g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver);
+
+ if (virBitmapIsBitSet(cfg->namespaces, QEMU_DOMAIN_NS_MOUNT) &&
+ qemuDomainEnableNamespace(vm, QEMU_DOMAIN_NS_MOUNT) < 0)
+ return -1;
+
+ return 0;
+}
+
+
/**
* qemuProcessLaunch:
*
@@ -6759,7 +6773,7 @@ qemuProcessLaunch(virConnectPtr conn,
VIR_DEBUG("Building mount namespace");
- if (qemuDomainCreateNamespace(driver, vm) < 0)
+ if (qemuProcessEnableDomainNamespaces(driver, vm) < 0)
goto cleanup;
VIR_DEBUG("Setting up raw IO");
--
2.26.2