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