From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52579) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCWPG-000849-6K for qemu-devel@nongnu.org; Fri, 14 Sep 2012 09:58:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TCWPC-0000e4-2m for qemu-devel@nongnu.org; Fri, 14 Sep 2012 09:58:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:12610) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCWPB-0000dv-Oy for qemu-devel@nongnu.org; Fri, 14 Sep 2012 09:58:01 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q8EDw1nY000442 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 14 Sep 2012 09:58:01 -0400 Message-ID: <505337E6.80801@redhat.com> Date: Fri, 14 Sep 2012 15:57:58 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <50532E80.5060905@redhat.com> <20120914134724.GA6819@redhat.com> In-Reply-To: <20120914134724.GA6819@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] directory hierarchy List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: qemu-devel Il 14/09/2012 15:47, Daniel P. Berrange ha scritto: > On Fri, Sep 14, 2012 at 03:17:52PM +0200, Paolo Bonzini wrote: >> Hi all, >> >> here is a proposal for moving around 150 C files currently in the >> toplevel directory to separate, well-delimited subdirectories. Header >> files would be moved for now in include/, preparing for subsequent >> reorganization of headers. > > I tend to view usage of a separate 'include/' subdirectory as a > location for public facing header files. For internal header > files, IMHO, its nicer to just have them alongside the .c file > which has the corresponding implementation. Yes, me too, but unfortunately almost nothing follows this scheme in QEMU. Probably the hw/ files do, but I'm not touching those with a pole. >> Usually the files would keep their names, but I loathe names starting >> with qemu-* so I took the occasion to rename those. > > Heh, I would have suggested the opposite - use a 'qemu-' prefix on > every single file, mostly so that you avoid the confusion where a > source-local header file happens to have same name as a public > header file in /usr/include. Note the above quote is about C files, not headers. For headers, I would solve the confusion by moving them all in subdirectories of include/, but not yet. I want to keep source files 100% unchanged for now. > I appauld your amibition to modularize the source tree layout > more. Even if you disagree with my POV on the issues above, it > would be an improvement. Oh, on a fresh project I'd agree a lot. Just trying to do things piecewise. Paolo