From 73d330cf0a5cd96372d9a0983717dd5c3e7ef32f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Thu, 4 Sep 2003 04:07:39 +0000 Subject: [PATCH] Added some missing index functions, and ifdef'd them out, since that functionality might not be accessible for R1. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4492 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/core/fs/vfs.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/kernel/core/fs/vfs.c b/src/kernel/core/fs/vfs.c index 9a2a12f755..0e5ebe4ee8 100755 --- a/src/kernel/core/fs/vfs.c +++ b/src/kernel/core/fs/vfs.c @@ -228,6 +228,23 @@ struct fd_ops gIndexDirectoryOps = { index_dir_free_fd }; +#if 0 +struct fd_ops gIndexOps = { + NULL, // read() + NULL, // write() + NULL, // seek() + NULL, // ioctl() + NULL, // select() + NULL, // deselect() + NULL, // dir_read() + NULL, // dir_rewind() + index_read_stat, // read_stat() + NULL, // write_stat() + NULL, // dir_close() + NULL // free_fd() +}; +#endif + static int mount_compare(void *_m, const void *_key) @@ -3056,6 +3073,7 @@ out: } +#if 0 static status_t index_read_stat(struct file_descriptor *descriptor, struct stat *stat) { @@ -3071,6 +3089,19 @@ index_read_stat(struct file_descriptor *descriptor, struct stat *stat) } +static void +index_free_fd(struct file_descriptor *descriptor) +{ + struct vnode *vnode = descriptor->u.vnode; + + if (vnode != NULL) { + FS_CALL(vnode, free_index_cookie)(vnode->mount->cookie, vnode->private_node, descriptor->cookie); + put_vnode(vnode); + } +} +#endif + + static status_t index_name_read_stat(mount_id mountID, const char *name, struct stat *stat, bool kernel) {