From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49800) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLSEX-0000tS-Hs for qemu-devel@nongnu.org; Fri, 08 Jul 2016 05:38:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bLSEW-0002eg-Fy for qemu-devel@nongnu.org; Fri, 08 Jul 2016 05:38:05 -0400 Date: Fri, 8 Jul 2016 11:37:54 +0200 From: Kevin Wolf Message-ID: <20160708093754.GE14684@noname.redhat.com> References: <1467732272-23368-1-git-send-email-clord@redhat.com> <1467732272-23368-5-git-send-email-clord@redhat.com> <20160705154925.GA6553@redhat.com> <32a142e7-8e46-9ae7-30b0-df42876601cb@redhat.com> <20160706082428.GD5233@noname.str.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v3 04/32] blockdev: Move bochs probe into separate file List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Colin Lord Cc: John Snow , mreitz@redhat.com, qemu-devel@nongnu.org, qemu-block@nongnu.org Am 07.07.2016 um 22:32 hat Colin Lord geschrieben: > On 07/06/2016 04:24 AM, Kevin Wolf wrote: > > Am 05.07.2016 um 22:50 hat John Snow geschrieben: > >> So, something like: > >> > >> block/drivers/bochs/ > > > > block/bochs/ if anything. We don't have to nest deeply just because we > > can. I don't really like new subdirectories, but when all drivers start > > to have multiple files, it might be unavoidable. > > > >> bochs.c > >> probe.c (or bochs-probe.c) > >> > >> and > >> > >> include/block/drivers/bochs/ > >> > >> common.h (or internal.h) > > > > block/bochs/internal.h (or bochs.h) > > > > Just like we already have some header files directly in block/ (e.g. > > qcow2.h). They are internal to the block driver, so no reason to move > > them to the global include directory. > > > > Kevin > > > So it sounds like what I should do is that for each driver I remove a > probe from, I'll create a new directory underneath block/ and put the > driver file, the probe file, and any new headers in it. eg for bochs, > there will be a new directory block/bochs/ under which there will be > block/bochs/bochs.c, block/bochs/bochs.h, and block/bochs/probe.c. Thus > no new headers will end up going in the include/ directory. Yes, either that or like Markus says, just create a block/bochs-probe.c and block/bochs.h and leave the existing files where they are. Maybe give us a bit more time to come to a conclusion. I could live with either. > Also if that's what I'm doing, I assume I should leave alone any headers > already in the block/ directory that are used by other files that I'm > not touching? eg block/qed.h already exists and is used by files other > than the driver and probe, so it seems like I should leave that alone. block/qed.h isn't used outside the driver. It's just that the driver consists of multiple files. If you decide to move files, of course you shouldn't only move qed.c, but qed-*.c, too. Kevin