aboutsummaryrefslogtreecommitdiff
path: root/softmmu
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2020-08-18 11:59:50 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2020-09-30 19:11:36 +0200
commit580e6ad6a4ebc1a039c86b7b7f0f2dcff0019091 (patch)
treebdc2b9b80c232d2bb484fcf5c67739fe9bc689de /softmmu
parentea1edcd7da1a375ef7ccf8aa93b72827b518ad8e (diff)
vl: relocate path to configuration file
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'softmmu')
-rw-r--r--softmmu/vl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/softmmu/vl.c b/softmmu/vl.c
index 12e8ca22bd..22bc570df4 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -2676,8 +2676,9 @@ static int global_init_func(void *opaque, QemuOpts *opts, Error **errp)
static int qemu_read_default_config_file(void)
{
int ret;
+ g_autofree char *file = get_relocated_path(CONFIG_QEMU_CONFDIR "/qemu.conf");
- ret = qemu_read_config_file(CONFIG_QEMU_CONFDIR "/qemu.conf");
+ ret = qemu_read_config_file(file);
if (ret < 0 && ret != -ENOENT) {
return ret;
}