From: Jeremy Allison Date: Fri, 9 Aug 2019 23:03:11 +0000 (-0700) Subject: s3: VFS: vfs_fruit. Remove rename_fn(). No longer used. X-Git-Tag: tdb-1.4.2~68 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7486b3c9f57b8e1353e93d51cd4597ad6f449509;p=thirdparty%2Fsamba.git s3: VFS: vfs_fruit. Remove rename_fn(). No longer used. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index b81dfe2988f..30dbf8af27a 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -1698,60 +1698,6 @@ static int fruit_close(vfs_handle_struct *handle, return ret; } -static int fruit_rename(struct vfs_handle_struct *handle, - const struct smb_filename *smb_fname_src, - const struct smb_filename *smb_fname_dst) -{ - int rc = -1; - struct fruit_config_data *config = NULL; - struct smb_filename *src_adp_smb_fname = NULL; - struct smb_filename *dst_adp_smb_fname = NULL; - - SMB_VFS_HANDLE_GET_DATA(handle, config, - struct fruit_config_data, return -1); - - if (!VALID_STAT(smb_fname_src->st)) { - DBG_ERR("Need valid stat for [%s]\n", - smb_fname_str_dbg(smb_fname_src)); - return -1; - } - - rc = SMB_VFS_NEXT_RENAME(handle, smb_fname_src, smb_fname_dst); - if (rc != 0) { - return -1; - } - - if ((config->rsrc != FRUIT_RSRC_ADFILE) || - (!S_ISREG(smb_fname_src->st.st_ex_mode))) - { - return 0; - } - - rc = adouble_path(talloc_tos(), smb_fname_src, &src_adp_smb_fname); - if (rc != 0) { - goto done; - } - - rc = adouble_path(talloc_tos(), smb_fname_dst, &dst_adp_smb_fname); - if (rc != 0) { - goto done; - } - - DBG_DEBUG("%s -> %s\n", - smb_fname_str_dbg(src_adp_smb_fname), - smb_fname_str_dbg(dst_adp_smb_fname)); - - rc = SMB_VFS_NEXT_RENAME(handle, src_adp_smb_fname, dst_adp_smb_fname); - if (errno == ENOENT) { - rc = 0; - } - -done: - TALLOC_FREE(src_adp_smb_fname); - TALLOC_FREE(dst_adp_smb_fname); - return rc; -} - static int fruit_renameat(struct vfs_handle_struct *handle, files_struct *srcfsp, const struct smb_filename *smb_fname_src, @@ -5119,7 +5065,6 @@ static struct vfs_fn_pointers vfs_fruit_fns = { .chmod_fn = fruit_chmod, .chown_fn = fruit_chown, .unlink_fn = fruit_unlink, - .rename_fn = fruit_rename, .renameat_fn = fruit_renameat, .rmdir_fn = fruit_rmdir, .open_fn = fruit_open,