DuplicateModule [Was: PATCH Check module version each time it is loaded]

Michal Suchanek hramrach at centrum.cz
Sun Oct 16 23:35:44 PDT 2011

On 14 October 2011 01:35, Peter Hutterer <peter.hutterer at who-t.net> wrote:
> On Mon, Oct 10, 2011 at 10:10:23AM +0200, Michal Suchanek wrote:

> so what's the behaviour now if you remove all devices? does it reload from
> the disk or reload the original module?

It is never reloaded according to the log.

As I understand it whenever a pointing device is plugged the X server
determines the name of the driver it needs. If driver of that name is
not loaded it loads one and saves it in a list of drivers, then takes
the driver from the list and duplicates it.

>> From 15e191dd91e09549ea2f96495f9f89ea0fd959ec Mon Sep 17 00:00:00 2001
>> From: Michal Suchanek <hramrach at centrum.cz>
>> Date: Sat, 8 Oct 2011 14:12:59 +0200
>> Subject: [PATCH 2/5] Document DuplicateModule function.
>> ---
>>  hw/xfree86/doc/ddxDesign.xml |   12 ++++++++++++
>>  1 files changed, 12 insertions(+), 0 deletions(-)
>> diff --git a/hw/xfree86/doc/ddxDesign.xml b/hw/xfree86/doc/ddxDesign.xml
>> index a4baad5..6afdc56 100644
>> --- a/hw/xfree86/doc/ddxDesign.xml
>> +++ b/hw/xfree86/doc/ddxDesign.xml
>> @@ -5495,6 +5495,18 @@ typedef struct {
>>        <blockquote><para>
>>         <programlisting>
>> +    pointer DuplicateModule(pointer mod);
> this prototype doesn't match the one in the code.

Indeed, it should be pointer DuplicateModule(pointer mod, pointer parent);


> I'd like to see the documentation in the code as well, that's the place
> where people are more likely to encounter it.

I am not quite sure about this doc. The function is in the
loaderProcs.h which is described as the header for functions exported
to modules for their use. However, unlike the other outward facing
functions it uses ModuleDescPtr, not just pointer. Is that really
meant to be used outside the X server?

Thanks for your revies

I will update the other patches and put them in git somewhere


More information about the xorg-devel mailing list