* [PATCH] monitor/qmp-cmds.c: Don't include ui/vnc.h
@ 2021-01-04 16:12 Peter Maydell
2021-01-04 16:30 ` Philippe Mathieu-Daudé
2021-01-15 13:28 ` Markus Armbruster
0 siblings, 2 replies; 4+ messages in thread
From: Peter Maydell @ 2021-01-04 16:12 UTC (permalink / raw)
To: qemu-devel; +Cc: Markus Armbruster
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. 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>
---
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"
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] monitor/qmp-cmds.c: Don't include ui/vnc.h
2021-01-04 16:12 [PATCH] monitor/qmp-cmds.c: Don't include ui/vnc.h Peter Maydell
@ 2021-01-04 16:30 ` Philippe Mathieu-Daudé
2021-01-04 17:13 ` Peter Maydell
2021-01-15 13:28 ` Markus Armbruster
1 sibling, 1 reply; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-01-04 16:30 UTC (permalink / raw)
To: Peter Maydell, qemu-devel; +Cc: Markus Armbruster
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"
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] monitor/qmp-cmds.c: Don't include ui/vnc.h
2021-01-04 16:30 ` Philippe Mathieu-Daudé
@ 2021-01-04 17:13 ` Peter Maydell
0 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2021-01-04 17:13 UTC (permalink / raw)
To: Philippe Mathieu-Daudé; +Cc: QEMU Developers, Markus Armbruster
On Mon, 4 Jan 2021 at 16:30, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>
> 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.
Yeah, I just floated that idea on IRC. I bet we have a ton of
places that don't follow the "headers not in include/ are supposed
to be subsystem-internal" guideline, though, so it feels like one
of those "whether it's worth the effort depends on how painful it is"
cleanups...
thanks
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] monitor/qmp-cmds.c: Don't include ui/vnc.h
2021-01-04 16:12 [PATCH] monitor/qmp-cmds.c: Don't include ui/vnc.h Peter Maydell
2021-01-04 16:30 ` Philippe Mathieu-Daudé
@ 2021-01-15 13:28 ` Markus Armbruster
1 sibling, 0 replies; 4+ messages in thread
From: Markus Armbruster @ 2021-01-15 13:28 UTC (permalink / raw)
To: Peter Maydell; +Cc: qemu-devel
Peter Maydell <peter.maydell@linaro.org> writes:
> 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. 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>
Almost missed this one. Queued, thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-01-15 14:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-04 16:12 [PATCH] monitor/qmp-cmds.c: Don't include ui/vnc.h Peter Maydell
2021-01-04 16:30 ` Philippe Mathieu-Daudé
2021-01-04 17:13 ` Peter Maydell
2021-01-15 13:28 ` Markus Armbruster
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.