[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH 5/6] module: load modules at start
From: |
Michael Tokarev |
Subject: |
Re: [Qemu-devel] [RFC PATCH 5/6] module: load modules at start |
Date: |
Thu, 05 Sep 2013 15:49:24 +0400 |
User-agent: |
Mozilla/5.0 (X11; Linux i686 on x86_64; rv:17.0) Gecko/20130704 Icedove/17.0.7 |
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
[Qemu-devel] [RFC PATCH 5/6] module: load modules at start, Fam Zheng, 2013/09/05
[Qemu-devel] [RFC PATCH 6/6] curl: build as shared library, Fam Zheng, 2013/09/05
Re: [Qemu-devel] [RFC PATCH 0/6] Shared Library Module Support, Fam Zheng, 2013/09/05