qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file
Date: Wed, 11 Jan 2017 17:12:02 +0000
User-agent: Mutt/1.7.1 (2016-10-04)

On Tue, Jan 10, 2017 at 10:51:29AM -0600, Eric Blake wrote:
> On 01/10/2017 10:37 AM, Stefan Hajnoczi wrote:
> > On Fri, Jan 06, 2017 at 03:54:58PM +0000, Daniel P. Berrange wrote:
> >> diff --git a/io/channel-buffer.c b/io/channel-buffer.c
> >> index 43d7959..b4e50d6 100644
> >> --- a/io/channel-buffer.c
> >> +++ b/io/channel-buffer.c
> >> @@ -22,7 +22,7 @@
> >>  #include "io/channel-buffer.h"
> >>  #include "io/channel-watch.h"
> >>  #include "qemu/sockets.h"
> >> -#include "trace.h"
> >> +#include "io/trace.h"
> > 
> > Is this change necessary?
> 
> Yes - now that there are more than one trace.h files spread across
> multiple directories, you need a prefix to ensure the correct one gets
> included.  In this particular case, it also matches consistency in
> including "io/channel-buffer.h" rather than just "channel-buffer.h".

"io/channel-buffer.h" is no more consistent or clear than
"channel-buffer.h".

Does it mean include/io/channel-buffer.h or
./include/io/channel-buffer.h?  You don't know unless you know the
compiler include paths and which directories have a channel-buffer.h
file.

IMO a simple "foo.h" is clearest for ./foo.h.

Stefan

Attachment: signature.asc
Description: PGP signature


reply via email to

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