rem: if (hash_lookup(module_files, newpath) != NULL)
add: if (hash_get(module_files, newpath, strlen(newpath)) != NULL)
context: static int recurse_directory(const char *path, const char *match){	/* ToDo: should just use opendir(), readdir(), ... */	struct stat stat;	int res = 0, dir;	int bufferSize = sizeof(struct dirent) + SYS_MAX_NAME_LEN + 1;	struct dirent *dirent;	if ((dir = sys_open_dir(path)) < 0)		return -1;	dirent = kmalloc(bufferSize);	if (!dirent) {		sys_close(dir);		return -1;	}	/* loop until we have a match or we run out of entries */	while (res <= 0) {		char *newpath;		size_t slen = 0;		SHOW_FLOW(3, "scanning %s\n", path);		if ((res = sys_read_dir(dir, dirent, bufferSize, 1)) <= 0)			break;		dirent->d_name[dirent->d_reclen] = '\0';		slen = strlen(path) + strlen(dirent->d_name) + 2;			newpath = (char*)kmalloc(slen);		strlcpy(newpath, path, slen);		strlcat(newpath, "/", slen);		strlcat(newpath, dirent->d_name, slen);		if ((res = sys_read_stat(newpath, &stat)) != B_NO_ERROR) {			kfree(newpath);			break;		}		/* If we got here, we have either a file or a directory.		 * If it's a file, do we have the details on record?		 *  If we don't, then load the file and record it's details.		 *  If it matches our search path we'll return afterwards.		 */		if (S_ISREG(stat.st_mode)) {			/* do we already know about this file? 			 * If we do res = 0 and we'll just carry on, if			 * not, it's a new file so we need to read in the			 * file details via recurse_file_check() function.			 */			if (hash_lookup(module_files, newpath) != NULL)				res = 0;			else				res = recurse_check_file(newpath, match);		} else if (S_ISDIR(stat.st_mode)) {			res = recurse_directory(newpath, match);		}		kfree(newpath);	}	kfree(dirent);	sys_close(dir);	return res;}