Blob Blame History Raw
From aa95c0fea0aa938873717ccb91319b2c3e48d000 Mon Sep 17 00:00:00 2001
Message-Id: <aa95c0fea0aa938873717ccb91319b2c3e48d000@dist-git>
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
Date: Tue, 24 Mar 2020 11:30:17 +0100
Subject: [PATCH] qemu: virtiofs: shorten pid filename
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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

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

https://bugzilla.redhat.com/show_bug.cgi?id=1816577

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Suggested-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit 7055af6c2253666cd0b7c4c459c5a019da789140)
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Message-Id: <619956878ec3e09fe6481c7e25b2820753aa57e5.1585045801.git.jtomko@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@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 d579ce1d33..b47e19a562 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.26.0