From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46539) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cR0Vn-0004Bi-6o for qemu-devel@nongnu.org; Tue, 10 Jan 2017 12:47:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cR0Vj-0007Ck-AL for qemu-devel@nongnu.org; Tue, 10 Jan 2017 12:47:07 -0500 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:33872) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cR0Vj-0007CL-3y for qemu-devel@nongnu.org; Tue, 10 Jan 2017 12:47:03 -0500 Received: by mail-wm0-x243.google.com with SMTP id c85so31237951wmi.1 for ; Tue, 10 Jan 2017 09:47:02 -0800 (PST) Sender: Paolo Bonzini References: <20170106155543.12827-1-berrange@redhat.com> <20170106155543.12827-3-berrange@redhat.com> <20170110163713.GA19869@stefanha-x1.localdomain> From: Paolo Bonzini Message-ID: Date: Tue, 10 Jan 2017 18:47:01 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , Stefan Hajnoczi , "Daniel P. Berrange" Cc: qemu-devel@nongnu.org On 10/01/2017 17:51, 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". > >> >> I think the per-subdir trace.h file should be generated in >> $BUILD_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. The wrong one shouldn't be available at all. io/channel-buffer.h is in include/io/, while io/trace.h is in io/. But I guess this can be cleaned up through the whole tree later if Stefan wants to merge this more disrupting series soon. Paolo