diff options
author | Jeremy Allison <jra@samba.org> | 2019-08-12 16:49:26 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2019-08-20 21:09:27 +0000 |
commit | 6c3928e4e5b724190843f75bec3e697af77a01a0 (patch) | |
tree | 0d55473b43db8b53d29fc218514efee93adfce2b /examples | |
parent | 098486da91bdf431489879154e297591edef7f83 (diff) | |
download | samba-6c3928e4e5b724190843f75bec3e697af77a01a0.tar.gz |
s3: VFS: Add SMB_VFS_LINKAT().
Currently identical to SMB_VFS_LINK().
Next, move add to all VFS modules that implement
link and eventually remove link.
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.c | 12 | ||||
-rw-r--r-- | examples/VFS/skel_transparent.c | 16 |
2 files changed, 28 insertions, 0 deletions
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c index 40e16c342ef..351e0f690cb 100644 --- a/examples/VFS/skel_opaque.c +++ b/examples/VFS/skel_opaque.c @@ -481,6 +481,17 @@ static int skel_link(vfs_handle_struct *handle, return -1; } +static int skel_linkat(vfs_handle_struct *handle, + files_struct *srcfsp, + const struct smb_filename *old_smb_fname, + files_struct *dstfsp, + const struct smb_filename *new_smb_fname, + int flags) +{ + errno = ENOSYS; + return -1; +} + static int skel_mknod(vfs_handle_struct *handle, const struct smb_filename *smb_fname, mode_t mode, @@ -1087,6 +1098,7 @@ static struct vfs_fn_pointers skel_opaque_fns = { .symlink_fn = skel_symlink, .readlink_fn = skel_vfs_readlink, .link_fn = skel_link, + .linkat_fn = skel_linkat, .mknod_fn = skel_mknod, .realpath_fn = skel_realpath, .chflags_fn = skel_chflags, diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c index b5d44377463..9b294ec6877 100644 --- a/examples/VFS/skel_transparent.c +++ b/examples/VFS/skel_transparent.c @@ -578,6 +578,21 @@ static int skel_link(vfs_handle_struct *handle, return SMB_VFS_NEXT_LINK(handle, old_smb_fname, new_smb_fname); } +static int skel_linkat(vfs_handle_struct *handle, + files_struct *srcfsp, + const struct smb_filename *old_smb_fname, + files_struct *dstfsp, + const struct smb_filename *new_smb_fname, + int flags) +{ + return SMB_VFS_NEXT_LINKAT(handle, + srcfsp, + old_smb_fname, + dstfsp, + new_smb_fname, + flags); +} + static int skel_mknod(vfs_handle_struct *handle, const struct smb_filename *smb_fname, mode_t mode, @@ -1353,6 +1368,7 @@ static struct vfs_fn_pointers skel_transparent_fns = { .symlink_fn = skel_symlink, .readlink_fn = skel_vfs_readlink, .link_fn = skel_link, + .linkat_fn = skel_linkat, .mknod_fn = skel_mknod, .realpath_fn = skel_realpath, .chflags_fn = skel_chflags, |