qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 07/10] virtiofsd: Use qemu_get_runtime_dir()


From: Akihiko Odaki
Subject: [PATCH v2 07/10] virtiofsd: Use qemu_get_runtime_dir()
Date: Thu, 10 Nov 2022 19:06:26 +0900

qemu_get_runtime_dir() is used to construct the path to a lock file.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
---
 tools/virtiofsd/fuse_virtio.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/virtiofsd/fuse_virtio.c b/tools/virtiofsd/fuse_virtio.c
index 9368e292e4..b9eeed85e6 100644
--- a/tools/virtiofsd/fuse_virtio.c
+++ b/tools/virtiofsd/fuse_virtio.c
@@ -901,12 +901,12 @@ static bool fv_socket_lock(struct fuse_session *se)
 {
     g_autofree gchar *sk_name = NULL;
     g_autofree gchar *pidfile = NULL;
-    g_autofree gchar *state = NULL;
+    g_autofree gchar *run = NULL;
     g_autofree gchar *dir = NULL;
     Error *local_err = NULL;
 
-    state = qemu_get_local_state_dir();
-    dir = g_build_filename(state, "run", "virtiofsd", NULL);
+    run = qemu_get_runtime_dir();
+    dir = g_build_filename(run, "virtiofsd", NULL);
 
     if (g_mkdir_with_parents(dir, S_IRWXU) < 0) {
         fuse_log(FUSE_LOG_ERR, "%s: Failed to create directory %s: %s\n",
-- 
2.38.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]