From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52057) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHY46-0000ml-06 for qemu-devel@nongnu.org; Thu, 05 Sep 2013 07:49:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VHY3y-0005Ge-NI for qemu-devel@nongnu.org; Thu, 05 Sep 2013 07:49:33 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:51095) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHY3y-0005Ga-FZ for qemu-devel@nongnu.org; Thu, 05 Sep 2013 07:49:26 -0400 Message-ID: <52286FC4.70505@msgid.tls.msk.ru> Date: Thu, 05 Sep 2013 15:49:24 +0400 From: Michael Tokarev MIME-Version: 1.0 References: <1378376448-29036-1-git-send-email-famz@redhat.com> <1378376448-29036-6-git-send-email-famz@redhat.com> In-Reply-To: <1378376448-29036-6-git-send-email-famz@redhat.com> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH 5/6] module: load modules at start List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com 05.09.2013 14:20, Fam Zheng wrote: > Add module_load_all to load all DSO modules under: > /usr/lib/qemu/block/ > /usr/lib/qemu/net/ > /usr/lib/qemu/ui/ > when starting process. NACK. This is wrong, as has been mentioned already. For example, you can't expect to load ui/* from qemu-img, because qemu-img provides no symbols needed to link ui stuff. Much better approach is to hook this stuff into object/module registration framework, in module.c. And either load every object of a given kind at the init time, or try to load it at lookup time if the requested object isn't found in current list. I implemented this approach in my tree more than a month ago. Thanks, /mjt