add: if (iterator->builtin_modules) { if (sBuiltInModules[iterator->module_offset] != NULL) { *_bufferSize = strlcpy(buffer, sBuiltInModules[iterator->module_offset++]->name, *_bufferSize); return B_OK; } else iterator->builtin_modules = false; }
context: iterator_get_next_module(module_iterator *iterator, char *buffer, size_t *_bufferSize){	status_t status;	TRACE(("iterator_get_next_module() -- start\n"));nextDirectory:	if (iterator->current_dir == NULL) {		// get next directory path from the stack		const char *path = iterator_pop_path_from_stack(iterator);		if (path == NULL) {			// we are finished, there are no more entries on the stack			return B_ENTRY_NOT_FOUND;		}		free((void *)iterator->current_path);		iterator->current_path = path;		iterator->current_dir = opendir(path);		TRACE(("open directory at %s -> %p\n", path, iterator->current_dir));		if (iterator->current_dir == NULL) {			// we don't throw an error here, but silently go to			// the next directory on the stack			goto nextDirectory;		}	}nextModuleImage:	if (iterator->current_header == NULL) {		// get next entry from the current directory		char path[SYS_MAX_PATH_LEN];		struct dirent *dirent;		struct stat st;		errno = 0;		if ((dirent = readdir(iterator->current_dir)) == NULL) {			closedir(iterator->current_dir);			iterator->current_dir = NULL;			if (errno < B_OK)				return errno;			goto nextDirectory;		}		if (!strcmp(dirent->d_name, ".")			|| !strcmp(dirent->d_name, ".."))			goto nextModuleImage;		// build absolute path to current file		strlcpy(path, iterator->current_path, sizeof(path));		strlcat(path, "/", sizeof(path));		strlcat(path, dirent->d_name, sizeof(path));		// find out if it's a directory or a file		if (stat(path, &st) < 0)			return errno;		iterator->current_module_path = strdup(path);		if (iterator->current_module_path == NULL)			return B_NO_MEMORY;		if (S_ISDIR(st.st_mode)) {			status = iterator_push_path_on_stack(iterator, iterator->current_module_path);			if (status < B_OK)				return status;			iterator->current_module_path = NULL;			goto nextModuleImage;		}		if (!S_ISREG(st.st_mode))			return B_BAD_TYPE;		TRACE(("open module at %s\n", path));		status = get_module_image(path, &iterator->module_image);		if (status < B_OK) {			free((void *)iterator->current_module_path);			iterator->current_module_path = NULL;			goto nextModuleImage;		}		iterator->current_header = iterator->module_image->info;		iterator->module_offset = 0;	}	if (*iterator->current_header == NULL) {		iterator->current_header = NULL;		free((void *)iterator->current_module_path);		iterator->current_module_path = NULL;		put_module_image(iterator->module_image);		iterator->module_image = NULL;		goto nextModuleImage;	}	// ToDo: we might want to create a module here and cache it in the hash table	*_bufferSize = strlcpy(buffer, (*iterator->current_header)->name, *_bufferSize);	iterator->current_header++;	iterator->module_offset++;	return B_OK;}