[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/3] char: fix alias devices regression
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH 1/3] char: fix alias devices regression |
Date: |
Thu, 08 Jun 2017 09:10:18 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
Marc-André Lureau <address@hidden> writes:
> Fix regression from commit 4d43a603c71, where the serial and parallel
> headers got removed from char.c, which broke the alias table.
>
> Signed-off-by: Marc-André Lureau <address@hidden>
> ---
> chardev/char.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/chardev/char.c b/chardev/char.c
> index 7aa0210765..f38fac5c6b 100644
> --- a/chardev/char.c
> +++ b/chardev/char.c
> @@ -34,6 +34,8 @@
> #include "qemu/help_option.h"
>
> #include "chardev/char-mux.h"
> +#include "chardev/char-parallel.h" /* for HAVE_CHARDEV_PARPORT */
> +#include "chardev/char-serial.h" /* for HAVE_CHARDEV_SERIAL */
>
> /***********************************************************/
> /* character device */
Two drive-by observations:
* Putting HAVE_FOOs in random headers, then testing them with #ifdef is
asking for trouble. Anything you test with #ifdef should be there
after #include "qemu/osdep.h" at the latest, or be defined in the same
.c.
* Such comments after #include rot quickly. Strong dislike.
Doesn't mean this isn't an acceptable minimally invasive regression fix.