rem: file = sys_open( path, STREAM_TYPE_DIR, 0 ); if (file < 0 ) { SHOW_FLOW( 3, "couldn't open directory %s (%s)\n", path, strerror( file ));
add: dir = sys_open_dir(path); if (dir < 0 ) { SHOW_FLOW(3, "couldn't open directory %s (%s)\n", path, strerror(dir));
context: static inline int module_enter_dir(module_iterator *iter, const char *path){	int file;	int res;		file = sys_open( path, STREAM_TYPE_DIR, 0 );	if (file < 0 ) {		SHOW_FLOW( 3, "couldn't open directory %s (%s)\n", path, strerror( file ));				// there are so many errors for "not found" that we don't bother		// and always assume that the directory suddenly disappeared		return B_NO_ERROR;	}							res = module_create_dir_iterator(iter, file, path);	if (res != B_NO_ERROR) {		sys_close(file);		return ENOMEM;	}		SHOW_FLOW( 3, "entered directory %s\n", path );					return B_NO_ERROR;}