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: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file
Date: Tue, 10 Jan 2017 10:51:29 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0

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".

> 
> I think the per-subdir trace.h file should be generated in
> $BUILD_DIR/<sub-dir>/trace.h and gcc -I. can locate that file.

It can indeed locate it, but now you are depending on -I ordering to
make sure it locates the right one before any other wrong one, which
feels too fragile to me.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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