* Added open_module_list_etc() that also allows to specify a required name

suffix. You can use this to verify the version of a module_info structure.
* Made module_info::std_ops optional.
* Minor cleanup in module.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24873 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2008-04-09 14:36:04 +00:00
parent 4f61b1059c
commit 8b79f1fd68
3 changed files with 65 additions and 27 deletions
+4 -2
View File
@@ -273,7 +273,8 @@ Module::Init()
{
status_t error = (fInfo ? B_OK : B_NO_INIT);
if (error == B_OK && !fInitialized) {
error = fInfo->std_ops(B_MODULE_INIT);
if (fInfo->std_ops != NULL)
error = fInfo->std_ops(B_MODULE_INIT);
if (error == B_OK)
fInitialized = true;
}
@@ -286,7 +287,8 @@ Module::Uninit()
{
status_t error = (fInfo ? B_OK : B_NO_INIT);
if (error == B_OK && fInitialized) {
error = fInfo->std_ops(B_MODULE_UNINIT);
if (fInfo->std_ops != NULL)
error = fInfo->std_ops(B_MODULE_UNINIT);
fInitialized = false;
}
return error;