render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
d76c62
From aa95c0fea0aa938873717ccb91319b2c3e48d000 Mon Sep 17 00:00:00 2001
d76c62
Message-Id: <aa95c0fea0aa938873717ccb91319b2c3e48d000@dist-git>
d76c62
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
d76c62
Date: Tue, 24 Mar 2020 11:30:17 +0100
d76c62
Subject: [PATCH] qemu: virtiofs: shorten pid filename
d76c62
MIME-Version: 1.0
d76c62
Content-Type: text/plain; charset=UTF-8
d76c62
Content-Transfer-Encoding: 8bit
d76c62
d76c62
There is no need to repeat the shortName, since it's
d76c62
already present in the directory path.
d76c62
d76c62
Also use just 'fs' instead of 'virtiofsd'.
d76c62
d76c62
https://bugzilla.redhat.com/show_bug.cgi?id=1816577
d76c62
d76c62
Signed-off-by: Ján Tomko <jtomko@redhat.com>
d76c62
Suggested-by: Andrea Bolognani <abologna@redhat.com>
d76c62
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
d76c62
(cherry picked from commit 7055af6c2253666cd0b7c4c459c5a019da789140)
d76c62
Signed-off-by: Ján Tomko <jtomko@redhat.com>
d76c62
Message-Id: <619956878ec3e09fe6481c7e25b2820753aa57e5.1585045801.git.jtomko@redhat.com>
d76c62
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
d76c62
---
d76c62
 src/qemu/qemu_virtiofs.c | 6 +-----
d76c62
 1 file changed, 1 insertion(+), 5 deletions(-)
d76c62
d76c62
diff --git a/src/qemu/qemu_virtiofs.c b/src/qemu/qemu_virtiofs.c
d76c62
index d579ce1d33..b47e19a562 100644
d76c62
--- a/src/qemu/qemu_virtiofs.c
d76c62
+++ b/src/qemu/qemu_virtiofs.c
d76c62
@@ -42,13 +42,9 @@ qemuVirtioFSCreatePidFilename(virDomainObjPtr vm,
d76c62
                               const char *alias)
d76c62
 {
d76c62
     qemuDomainObjPrivatePtr priv = vm->privateData;
d76c62
-    g_autofree char *shortName = NULL;
d76c62
     g_autofree char *name = NULL;
d76c62
 
d76c62
-    if (!(shortName = virDomainDefGetShortName(vm->def)))
d76c62
-        return NULL;
d76c62
-
d76c62
-    name = g_strdup_printf("%s-%s-virtiofsd", shortName, alias);
d76c62
+    name = g_strdup_printf("%s-fs", alias);
d76c62
 
d76c62
     return virPidFileBuildPath(priv->libDir, name);
d76c62
 }
d76c62
-- 
d76c62
2.26.0
d76c62