Received: from eggs.gnu.org ([2001:4830:134:3::10]:50410) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKQGF-0008C9-PR for qemu-devel@nongnu.org; Fri, 13 Sep 2013 06:06:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VKQG9-0006Hv-6H for qemu-devel@nongnu.org; Fri, 13 Sep 2013 06:05:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1072) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKQG8-0006Hm-QT for qemu-devel@nongnu.org; Fri, 13 Sep 2013 06:05:53 -0400 Date: Fri, 13 Sep 2013 18:05:35 +0800 From: Fam Zheng Message-ID: <20130913100535.GB6065@T430s.nay.redhat.com> References: <1379061534-19171-1-git-send-email-famz@redhat.com> <1379061534-19171-6-git-send-email-famz@redhat.com> <1C973DFB-D08C-495D-A797-F93CC6BE2BE4@alex.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1C973DFB-D08C-495D-A797-F93CC6BE2BE4@alex.org.uk> Subject: Re: [Qemu-devel] [PATCH v8 5/9] module: implement module loading function Reply-To: famz@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Bligh Cc: peter.maydell@linaro.org, mjt@tls.msk.ru, qemu-devel@nongnu.org, pbonzini@redhat.com, vilanova@ac.upc.edu, rth@twiddle.net On Fri, 09/13 10:56, Alex Bligh wrote: > > On 13 Sep 2013, at 09:38, Fam Zheng wrote: > > > Added three types of modules: > > > > typedef enum { > > MODULE_LOAD_BLOCK = 0, > > MODULE_LOAD_UI, > > MODULE_LOAD_NET, > > MODULE_LOAD_MAX, > > } module_load_type; > > > > and their loading function: > > What is the advantage of this enum and having > different types of module at all? If they are > all built together, why can't they all live > together in the same directory? > > Seems like an overcomplication. > They anyway need to be grouped: block drivers are almost always loaded, but not ui, or net (although they're not modulized in this series), and they shouldn't be loaded, from example by qemu-img, because of missing necessary functions. For this reason, I don't think subdirecotry is an overcomplication over file name prefix/postfix, or arrays of file name lists. Fam