diff mbox series

[09/13] vl: relocate path to configuration file

Message ID 20200901062020.26660-10-pbonzini@redhat.com
State New
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>
---
 softmmu/vl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Philippe Mathieu-Daudé Sept. 2, 2020, 8:28 a.m. UTC | #1
On 9/1/20 8:20 AM, Paolo Bonzini wrote:
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  softmmu/vl.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/softmmu/vl.c b/softmmu/vl.c
> index 81e325fa44..b79de9cd66 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;
>      }
> 

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
diff mbox series

Patch

diff --git a/softmmu/vl.c b/softmmu/vl.c
index 81e325fa44..b79de9cd66 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;
     }