summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2019-08-20 16:31:00 -0700
committerJeremy Allison <jra@samba.org>2019-08-22 18:00:33 +0000
commite2246876d1ebdde2eaa2bd635e8907f1671b4159 (patch)
treeea85101ba76cc55b00066c32673014ca4498f474 /examples
parente4c4af64fa7fde3ff116390182628235a2fb7185 (diff)
downloadsamba-e2246876d1ebdde2eaa2bd635e8907f1671b4159.tar.gz
s3: VFS: Add SMB_VFS_MKNODAT().
Currently identical to SMB_VFS_MKNOD(). Next, add to all VFS modules that implement mknod and eventually remove mknod. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
Diffstat (limited to 'examples')
-rw-r--r--examples/VFS/skel_opaque.c11
-rw-r--r--examples/VFS/skel_transparent.c14
2 files changed, 25 insertions, 0 deletions
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index 8de97e85147..a47b98b9896 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -493,6 +493,16 @@ static int skel_mknod(vfs_handle_struct *handle,
return -1;
}
+static int skel_mknodat(vfs_handle_struct *handle,
+ files_struct *dirfsp,
+ const struct smb_filename *smb_fname,
+ mode_t mode,
+ SMB_DEV_T dev)
+{
+ errno = ENOSYS;
+ return -1;
+}
+
static struct smb_filename *skel_realpath(vfs_handle_struct *handle,
TALLOC_CTX *ctx,
const struct smb_filename *smb_fname)
@@ -1091,6 +1101,7 @@ static struct vfs_fn_pointers skel_opaque_fns = {
.readlink_fn = skel_vfs_readlink,
.linkat_fn = skel_linkat,
.mknod_fn = skel_mknod,
+ .mknodat_fn = skel_mknodat,
.realpath_fn = skel_realpath,
.chflags_fn = skel_chflags,
.file_id_create_fn = skel_file_id_create,
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index 015f72c1549..e5f6305be4d 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -594,6 +594,19 @@ static int skel_mknod(vfs_handle_struct *handle,
return SMB_VFS_NEXT_MKNOD(handle, smb_fname, mode, dev);
}
+static int skel_mknodat(vfs_handle_struct *handle,
+ files_struct *dirfsp,
+ const struct smb_filename *smb_fname,
+ mode_t mode,
+ SMB_DEV_T dev)
+{
+ return SMB_VFS_NEXT_MKNODAT(handle,
+ dirfsp,
+ smb_fname,
+ mode,
+ dev);
+}
+
static struct smb_filename *skel_realpath(vfs_handle_struct *handle,
TALLOC_CTX *ctx,
const struct smb_filename *smb_fname)
@@ -1362,6 +1375,7 @@ static struct vfs_fn_pointers skel_transparent_fns = {
.readlink_fn = skel_vfs_readlink,
.linkat_fn = skel_linkat,
.mknod_fn = skel_mknod,
+ .mknodat_fn = skel_mknodat,
.realpath_fn = skel_realpath,
.chflags_fn = skel_chflags,
.file_id_create_fn = skel_file_id_create,