From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50830) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCWF5-0006Yp-21 for qemu-devel@nongnu.org; Fri, 14 Sep 2012 09:47:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TCWF0-0005EO-Id for qemu-devel@nongnu.org; Fri, 14 Sep 2012 09:47:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39601) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCWF0-0005EK-91 for qemu-devel@nongnu.org; Fri, 14 Sep 2012 09:47:30 -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 q8EDlTI2012435 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 14 Sep 2012 09:47:29 -0400 Date: Fri, 14 Sep 2012 14:47:24 +0100 From: "Daniel P. Berrange" Message-ID: <20120914134724.GA6819@redhat.com> References: <50532E80.5060905@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <50532E80.5060905@redhat.com> Subject: Re: [Qemu-devel] directory hierarchy Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel 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. I know QEMU has traditionally been a bit wierd having giant header files containing decls that are then implemented across a whole set of source files. Perhaps it is worthwhile to focus on santizing the headers rather than moving them elsewhere where there's even less incentive to keep header + source filenames aligned. > 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. > This does not touch the hw/ directory, which is its own mess and worth a > separate discussion. Cleaning it up may require introducing more > CONFIG_* symbols and moving stuff to libhw whenever possible (for > example if we want all NICs in hw/net, all RTCs in hw/rtc, etc. perhaps > with some exceptions for USB). > > Opinions, flames, "stop this guy"s are welcome as usual. 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. Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|