There is no need to repeat the shortName, since it's
already present in the directory path.

Also use just 'fs' instead of 'virtiofsd'.

Signed-off-by: Ján Tomko <jto...@redhat.com>
Suggested-by: Andrea Bolognani <abolo...@redhat.com>
---
 src/qemu/qemu_virtiofs.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/qemu/qemu_virtiofs.c b/src/qemu/qemu_virtiofs.c
index d6159206eb..2e3535873d 100644
--- a/src/qemu/qemu_virtiofs.c
+++ b/src/qemu/qemu_virtiofs.c
@@ -42,13 +42,9 @@ qemuVirtioFSCreatePidFilename(virDomainObjPtr vm,
                               const char *alias)
 {
     qemuDomainObjPrivatePtr priv = vm->privateData;
-    g_autofree char *shortName = NULL;
     g_autofree char *name = NULL;
 
-    if (!(shortName = virDomainDefGetShortName(vm->def)))
-        return NULL;
-
-    name = g_strdup_printf("%s-%s-virtiofsd", shortName, alias);
+    name = g_strdup_printf("%s-fs", alias);
 
     return virPidFileBuildPath(priv->libDir, name);
 }
-- 
2.25.1

Reply via email to