qemu-devel
[Top][All Lists]
Advanced

[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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]