diff options
author | Ralph Boehme <slow@samba.org> | 2020-11-22 13:57:27 +0100 |
---|---|---|
committer | Ralph Boehme <slow@samba.org> | 2020-12-16 09:08:31 +0000 |
commit | dba8593c6f8c11d18ddc01e54f90c50c44070257 (patch) | |
tree | 310e8930d3b9f52abe7c98d073548fb97f4bdf20 /examples | |
parent | 985c1be5ccf40d0f5c85f42bc0d9bd0a15a86b59 (diff) | |
download | samba-dba8593c6f8c11d18ddc01e54f90c50c44070257.tar.gz |
vfs: Add dirfsp arg to SMB_VFS_READDIR()
This allows for optimisations in VFS module: by passing the dirfsp as an
additional arg, the function can check fsp->fsp_name->flags which may include eg
SMB_FILENAME_POSIX_PATH to trigger POSIX pathname processing.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/VFS/skel_opaque.c | 4 | ||||
-rw-r--r-- | examples/VFS/skel_transparent.c | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c index 2a3a7301bdb..b74f7360dde 100644 --- a/examples/VFS/skel_opaque.c +++ b/examples/VFS/skel_opaque.c @@ -156,7 +156,9 @@ static DIR *skel_fdopendir(vfs_handle_struct *handle, files_struct *fsp, } static struct dirent *skel_readdir(vfs_handle_struct *handle, - DIR *dirp, SMB_STRUCT_STAT *sbuf) + struct files_struct *dirfsp, + DIR *dirp, + SMB_STRUCT_STAT *sbuf) { return NULL; } diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c index a86b3e7cd19..969f0572cf5 100644 --- a/examples/VFS/skel_transparent.c +++ b/examples/VFS/skel_transparent.c @@ -164,9 +164,11 @@ static DIR *skel_fdopendir(vfs_handle_struct *handle, files_struct *fsp, } static struct dirent *skel_readdir(vfs_handle_struct *handle, - DIR *dirp, SMB_STRUCT_STAT *sbuf) + struct files_struct *dirfsp, + DIR *dirp, + SMB_STRUCT_STAT *sbuf) { - return SMB_VFS_NEXT_READDIR(handle, dirp, sbuf); + return SMB_VFS_NEXT_READDIR(handle, dirfsp, dirp, sbuf); } static void skel_seekdir(vfs_handle_struct *handle, DIR *dirp, long offset) |