[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 5/7] module: Use qemu_get_runtime_dir()
From: |
Akihiko Odaki |
Subject: |
[PATCH v4 5/7] module: Use qemu_get_runtime_dir() |
Date: |
Tue, 16 Jul 2024 16:27:35 +0900 |
qemu_get_runtime_dir() is used to construct the path to module upgrades.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20230921075425.16738-7-akihiko.odaki@daynix.com>
---
util/module.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/util/module.c b/util/module.c
index 32e263163c75..580658edf486 100644
--- a/util/module.c
+++ b/util/module.c
@@ -242,7 +242,8 @@ int module_load(const char *prefix, const char *name, Error
**errp)
version_dir = g_strcanon(g_strdup(QEMU_PKGVERSION),
G_CSET_A_2_Z G_CSET_a_2_z G_CSET_DIGITS "+-.~",
'_');
- dirs[n_dirs++] = g_strdup_printf("/var/run/qemu/%s", version_dir);
+ g_autofree char *run = qemu_get_runtime_dir();
+ dirs[n_dirs++] = g_build_filename(run, "qemu", version_dir, NULL);
#endif
assert(n_dirs <= ARRAY_SIZE(dirs));
--
2.45.2
[PATCH v4 2/7] ivshmem-server: Use qemu_get_runtime_dir(), Akihiko Odaki, 2024/07/16
[PATCH v4 4/7] scsi: Use qemu_get_runtime_dir(), Akihiko Odaki, 2024/07/16
[PATCH v4 5/7] module: Use qemu_get_runtime_dir(),
Akihiko Odaki <=
[PATCH v4 3/7] qga: Use qemu_get_runtime_dir(), Akihiko Odaki, 2024/07/16
[PATCH v4 6/7] util: Remove qemu_get_local_state_dir(), Akihiko Odaki, 2024/07/16
[PATCH v4 7/7] spice-app: Use qemu_get_runtime_dir(), Akihiko Odaki, 2024/07/16
Re: [PATCH v4 0/7] util: Introduce qemu_get_runtime_dir(), Michael Tokarev, 2024/07/16