Prints a warning if open_modules_list() or get_next_loaded_module_name() are

called before module_init(). Maybe it's even better to drop into the kernel
debugger.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15524 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2005-12-13 00:01:19 +00:00
parent 4fbc3f5803
commit b7e7814c79

View File

@ -1072,6 +1072,11 @@ open_module_list(const char *prefix)
TRACE(("open_module_list(prefix = %s)\n", prefix));
if (sModulesHash == NULL) {
dprintf("open_module_list() called too early!\n");
return NULL;
}
iterator = (module_iterator *)malloc(sizeof(module_iterator));
if (!iterator)
return NULL;
@ -1191,6 +1196,11 @@ get_next_loaded_module_name(uint32 *_cookie, char *buffer, size_t *_bufferSize)
struct module *module;
status_t status;
if (sModulesHash == NULL) {
dprintf("get_next_loaded_module_name() called too early!\n");
return NULL;
}
//TRACE(("get_next_loaded_module_name(\"%s\")\n", buffer));
if (_cookie == NULL || buffer == NULL || _bufferSize == NULL)