* 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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user