qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] monitor/qmp-cmds.c: Don't include ui/vnc.h


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH] monitor/qmp-cmds.c: Don't include ui/vnc.h
Date: Mon, 4 Jan 2021 17:30:43 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0

On 1/4/21 5:12 PM, Peter Maydell wrote:
> The qmp-cmds.c file currently includes ui/vnc.h, which (being located
> in the ui/ directory rather than include) is really supposed to be
> for use only by the ui subsystem.

That makes me remember yet another cleanup series I started few months
ago to remove -I$(srcdir) from $CFLAGS. Now that Meson is in, I might
eventually refresh it.

> In fact the function prototypes we
> need (vnc_display_password(), etc) are all declared in
> include/ui/console.h, so we can switch to including that instead.
> 
> (ui/vnc.h includes include/ui/console.h, so this change strictly
> reduces the quantity of headers qmp-cmds.c pulls in.)
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

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

> ---
> Spotted while trying to reduce the number of source files that
> indirectly include <gnutls.h>...
> ---
>  monitor/qmp-cmds.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/monitor/qmp-cmds.c b/monitor/qmp-cmds.c
> index 34f7e75b7bf..c95e5001d72 100644
> --- a/monitor/qmp-cmds.c
> +++ b/monitor/qmp-cmds.c
> @@ -23,7 +23,7 @@
>  #include "qemu/uuid.h"
>  #include "chardev/char.h"
>  #include "ui/qemu-spice.h"
> -#include "ui/vnc.h"
> +#include "ui/console.h"
>  #include "sysemu/kvm.h"
>  #include "sysemu/runstate.h"
>  #include "sysemu/runstate-action.h"
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]