diff mbox series

[06/13] module: relocate path to modules

Message ID 20200901062020.26660-7-pbonzini@redhat.com
State Superseded
Headers show
Series None | expand

Commit Message

Paolo Bonzini Sept. 1, 2020, 6:20 a.m. UTC
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 util/module.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/util/module.c b/util/module.c
index aed04b578a..c117d770fd 100644
--- a/util/module.c
+++ b/util/module.c
@@ -19,6 +19,7 @@ 
 #endif
 #include "qemu/queue.h"
 #include "qemu/module.h"
+#include "qemu/cutils.h"
 #ifdef CONFIG_MODULE_UPGRADES
 #include "qemu-version.h"
 #endif
@@ -202,7 +203,7 @@  bool module_load_one(const char *prefix, const char *lib_name)
     if (search_dir != NULL) {
         dirs[n_dirs++] = g_strdup_printf("%s", search_dir);
     }
-    dirs[n_dirs++] = g_strdup_printf("%s", CONFIG_QEMU_MODDIR);
+    dirs[n_dirs++] = get_relocated_path(CONFIG_QEMU_MODDIR);
     dirs[n_dirs++] = g_strdup(qemu_get_exec_dir());
 
 #ifdef CONFIG_MODULE_UPGRADES