diff mbox series

[v6,05/23] vl: drop needless -spice checks

Message ID 20231025190818.3278423-6-marcandre.lureau@redhat.com
State New
Headers show
Series Make Pixman an optional dependency | expand

Commit Message

Marc-André Lureau Oct. 25, 2023, 7:07 p.m. UTC
From: Marc-André Lureau <marcandre.lureau@redhat.com>

Since commit 5324e3e958e ("qemu-options: define -spice only #ifdef
CONFIG_SPICE"), it is unnecessary to check at runtime for "-spice"
option.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 system/vl.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

Comments

Thomas Huth Oct. 26, 2023, 5:23 a.m. UTC | #1
On 25/10/2023 21.07, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> Since commit 5324e3e958e ("qemu-options: define -spice only #ifdef
> CONFIG_SPICE"), it is unnecessary to check at runtime for "-spice"
> option.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>   system/vl.c | 7 +------
>   1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/system/vl.c b/system/vl.c
> index 92d29bf521..3be1a78a9d 100644
> --- a/system/vl.c
> +++ b/system/vl.c
> @@ -3475,12 +3475,7 @@ void qemu_init(int argc, char **argv)
>                   break;
>   #ifdef CONFIG_SPICE
>               case QEMU_OPTION_spice:
> -                olist = qemu_find_opts_err("spice", NULL);
> -                if (!olist) {
> -                    error_report("spice support is disabled");
> -                    exit(1);
> -                }
> -                opts = qemu_opts_parse_noisily(olist, optarg, false);
> +                opts = qemu_opts_parse_noisily(qemu_find_opts("spice"), optarg, false);
>                   if (!opts) {
>                       exit(1);
>                   }

Reviewed-by: Thomas Huth <thuth@redhat.com>
diff mbox series

Patch

diff --git a/system/vl.c b/system/vl.c
index 92d29bf521..3be1a78a9d 100644
--- a/system/vl.c
+++ b/system/vl.c
@@ -3475,12 +3475,7 @@  void qemu_init(int argc, char **argv)
                 break;
 #ifdef CONFIG_SPICE
             case QEMU_OPTION_spice:
-                olist = qemu_find_opts_err("spice", NULL);
-                if (!olist) {
-                    error_report("spice support is disabled");
-                    exit(1);
-                }
-                opts = qemu_opts_parse_noisily(olist, optarg, false);
+                opts = qemu_opts_parse_noisily(qemu_find_opts("spice"), optarg, false);
                 if (!opts) {
                     exit(1);
                 }