qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/3] char: fix alias devices regression


From: Marc-André Lureau
Subject: Re: [Qemu-devel] [PATCH 1/3] char: fix alias devices regression
Date: Thu, 8 Jun 2017 03:16:26 -0400 (EDT)

Hi

----- Original Message -----
> 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.
> 

I agree, is it fine to move those HAVE_FOO there?

> * Such comments after #include rot quickly.  Strong dislike.

Well, if that comment would have been there, there would have been less chance 
to remove the header by mistake, even if it rotted.




reply via email to

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