Segmentation fault when nebmodule returns with something else than 0
Tobias Mucke
tobias.mucke at googlemail.com
Wed Nov 28 07:41:50 CET 2007
Hi,
> Other than that, it looks obviously correct, although I wonder if it
> wouldn't be better to actually pass the real nebmodule struct to the
> init function. I guess that's what the entire idea was initially, or
> Ethan wouldn't have missed that one in set_module_info().
Agreed, but actually neb_load_module calls the initfunc with the
module_handle, not with the nebmodule struct.
result=(*initfunc)(NEBMODULE_NORMAL_LOAD,mod->args,mod->module_handle);
That is why the module itself doesn't know anything about itself other
than its module_handle. This approach is also charming because the
nebmodule struct can only be altered through API functions. I am
indifferent about these two approaches, but the API should be
consistent and not segfault because of inconsistency.
Thanks.
Tobias
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
More information about the Developers
mailing list