Intended as a replacement for qemuVirtioFSCreateSocketFilename,
to be used outside of qemu_virtiofs.c
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
src/qemu/qemu_domain.c | 10 ++++++++++
src/qemu/qemu_domain.h | 4 ++++
2 files changed, 14 insertions(+)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index a755f8678e..cb6aaecdee 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -11440,3 +11440,13 @@ qemuDomainNamePathsCleanup(virQEMUDriverConfig *cfg,
return 0;
}
+
+
+char *
+qemuDomainGetVHostUserFSSocketPath(qemuDomainObjPrivate *priv,
+ const virDomainFSDef *fs)
+{
+ if (fs->sock)
+ return g_strdup(fs->sock);
+ return virFileBuildPath(priv->libDir, fs->info.alias, "-fs.sock");
+}
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index 64f92988b7..aad076dd4c 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -1043,3 +1043,7 @@ int
qemuDomainNamePathsCleanup(virQEMUDriverConfig *cfg,
const char *name,
bool bestEffort);
+
+char *
+qemuDomainGetVHostUserFSSocketPath(qemuDomainObjPrivate *priv,
+ const virDomainFSDef *fs);
--
2.31.1