rem: FUNCTION(("vfs_open_dir: entry. path = '%s', omode %d, kernel %d\n", path, omode, kernel));
add: FUNCTION(("vfs_open_dir: path = '%s', kernel %d\n", path, kernel));
context: vfs_open_dir(char *path, bool kernel){	struct file_descriptor *descriptor;	struct vnode *vnode;	file_cookie cookie;	int status;	int fd;	FUNCTION(("vfs_open_dir: entry. path = '%s', omode %d, kernel %d\n", path, omode, kernel));	status = path_to_vnode(path, &vnode, kernel);	if (status < 0)		return status;	status = FS_CALL(vnode,fs_open_dir)(vnode->mount->cookie, vnode->priv_vnode, &cookie);	if (status < 0)		goto err;	// file is opened, create a fd	descriptor = alloc_fd();	if (!descriptor) {		status = ENOMEM;		goto err1;	}	descriptor->vnode = vnode;	descriptor->cookie = cookie;	descriptor->ops = &dir_ops;	descriptor->type = FDTYPE_DIR;	fd = new_fd(get_current_io_context(kernel), descriptor);	if (fd < 0) {		status = ERR_VFS_FD_TABLE_FULL;		goto err1;	}	return fd;err1:	FS_CALL(vnode,fs_close_dir)(vnode->mount->cookie,vnode->priv_vnode,cookie);	FS_CALL(vnode,fs_free_dir_cookie)(vnode->mount->cookie,vnode->priv_vnode,cookie);err:	dec_vnode_ref_count(vnode, true, false);	return status;}