vl: relocate path to configuration file

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
stable-6.0
Paolo Bonzini 2020-08-18 11:59:50 +02:00
parent ea1edcd7da
commit 580e6ad6a4
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}