mirror of
https://github.com/samba-team/samba.git
synced 2025-02-25 17:57:42 +03:00
s3: VFS: Complete the replacement of SMB_VFS_MKNOD() -> SMB_VFS_MKNODAT().
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Aug 22 19:17:07 UTC 2019 on sn-devel-184
This commit is contained in:
parent
e37580f45a
commit
6a8bc6b549
@ -484,15 +484,6 @@ static int skel_linkat(vfs_handle_struct *handle,
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int skel_mknod(vfs_handle_struct *handle,
|
||||
const struct smb_filename *smb_fname,
|
||||
mode_t mode,
|
||||
SMB_DEV_T dev)
|
||||
{
|
||||
errno = ENOSYS;
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int skel_mknodat(vfs_handle_struct *handle,
|
||||
files_struct *dirfsp,
|
||||
const struct smb_filename *smb_fname,
|
||||
@ -1100,7 +1091,6 @@ static struct vfs_fn_pointers skel_opaque_fns = {
|
||||
.symlink_fn = skel_symlink,
|
||||
.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,
|
||||
|
@ -586,14 +586,6 @@ static int skel_linkat(vfs_handle_struct *handle,
|
||||
flags);
|
||||
}
|
||||
|
||||
static int skel_mknod(vfs_handle_struct *handle,
|
||||
const struct smb_filename *smb_fname,
|
||||
mode_t mode,
|
||||
SMB_DEV_T dev)
|
||||
{
|
||||
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,
|
||||
@ -1374,7 +1366,6 @@ static struct vfs_fn_pointers skel_transparent_fns = {
|
||||
.symlink_fn = skel_symlink,
|
||||
.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,
|
||||
|
@ -85,7 +85,6 @@ struct tevent_context;
|
||||
SMBPROFILE_STATS_BASIC(syscall_readlink) \
|
||||
SMBPROFILE_STATS_BASIC(syscall_symlink) \
|
||||
SMBPROFILE_STATS_BASIC(syscall_linkat) \
|
||||
SMBPROFILE_STATS_BASIC(syscall_mknod) \
|
||||
SMBPROFILE_STATS_BASIC(syscall_mknodat) \
|
||||
SMBPROFILE_STATS_BASIC(syscall_realpath) \
|
||||
SMBPROFILE_STATS_BASIC(syscall_get_quota) \
|
||||
|
@ -274,7 +274,7 @@
|
||||
/* Version 42 - Make "lease" a const* in create_file_fn */
|
||||
/* Version 42 - Move SMB_VFS_RENAME -> SMB_VFS_RENAMEAT */
|
||||
/* Version 42 - Move SMB_VFS_LINK -> SMB_VFS_LINKAT. */
|
||||
/* Version 42 - Add SMB_VFS_MKDNODAT. */
|
||||
/* Version 42 - Move SMB_VFS_MKNOD -> SMB_VFS_MKDNODAT. */
|
||||
|
||||
#define SMB_VFS_INTERFACE_VERSION 42
|
||||
|
||||
@ -807,10 +807,6 @@ struct vfs_fn_pointers {
|
||||
struct files_struct *dstfsp,
|
||||
const struct smb_filename *new_smb_fname,
|
||||
int flags);
|
||||
int (*mknod_fn)(struct vfs_handle_struct *handle,
|
||||
const struct smb_filename *smb_fname,
|
||||
mode_t mode,
|
||||
SMB_DEV_T dev);
|
||||
int (*mknodat_fn)(struct vfs_handle_struct *handle,
|
||||
struct files_struct *dirfsp,
|
||||
const struct smb_filename *smb_fname,
|
||||
@ -1344,10 +1340,6 @@ int smb_vfs_call_linkat(struct vfs_handle_struct *handle,
|
||||
struct files_struct *dstfsp,
|
||||
const struct smb_filename *new_smb_fname,
|
||||
int flags);
|
||||
int smb_vfs_call_mknod(struct vfs_handle_struct *handle,
|
||||
const struct smb_filename *smb_fname,
|
||||
mode_t mode,
|
||||
SMB_DEV_T dev);
|
||||
int smb_vfs_call_mknodat(struct vfs_handle_struct *handle,
|
||||
struct files_struct *dirfsp,
|
||||
const struct smb_filename *smb_fname,
|
||||
@ -1778,10 +1770,6 @@ int vfs_not_implemented_linkat(vfs_handle_struct *handle,
|
||||
struct files_struct *dstfsp,
|
||||
const struct smb_filename *new_smb_fname,
|
||||
int flags);
|
||||
int vfs_not_implemented_mknod(vfs_handle_struct *handle,
|
||||
const struct smb_filename *smb_fname,
|
||||
mode_t mode,
|
||||
SMB_DEV_T dev);
|
||||
int vfs_not_implemented_mknodat(vfs_handle_struct *handle,
|
||||
struct files_struct *dirfsp,
|
||||
const struct smb_filename *smb_fname,
|
||||
|
@ -311,11 +311,6 @@
|
||||
#define SMB_VFS_NEXT_LINKAT(handle, srcfsp, oldpath, dstfsp, newpath, flags) \
|
||||
smb_vfs_call_linkat((handle)->next, (srcfsp), (oldpath), (dstfsp), (newpath), (flags))
|
||||
|
||||
#define SMB_VFS_MKNOD(conn, smb_fname, mode, dev) \
|
||||
smb_vfs_call_mknod((conn)->vfs_handles, (smb_fname), (mode), (dev))
|
||||
#define SMB_VFS_NEXT_MKNOD(handle, smb_fname, mode, dev) \
|
||||
smb_vfs_call_mknod((handle)->next, (smb_fname), (mode), (dev))
|
||||
|
||||
#define SMB_VFS_MKNODAT(conn, dirfsp, smb_fname, mode, dev) \
|
||||
smb_vfs_call_mknodat((conn)->vfs_handles, (dirfsp), (smb_fname), (mode), (dev))
|
||||
#define SMB_VFS_NEXT_MKNODAT(handle, dirfsp, smb_fname, mode, dev) \
|
||||
|
@ -2687,19 +2687,6 @@ static int vfswrap_linkat(vfs_handle_struct *handle,
|
||||
return result;
|
||||
}
|
||||
|
||||
static int vfswrap_mknod(vfs_handle_struct *handle,
|
||||
const struct smb_filename *smb_fname,
|
||||
mode_t mode,
|
||||
SMB_DEV_T dev)
|
||||
{
|
||||
int result;
|
||||
|
||||
START_PROFILE(syscall_mknod);
|
||||
result = sys_mknod(smb_fname->base_name, mode, dev);
|
||||
END_PROFILE(syscall_mknod);
|
||||
return result;
|
||||
}
|
||||
|
||||
static int vfswrap_mknodat(vfs_handle_struct *handle,
|
||||
files_struct *dirfsp,
|
||||
const struct smb_filename *smb_fname,
|
||||
@ -3501,7 +3488,6 @@ static struct vfs_fn_pointers vfs_default_fns = {
|
||||
.symlink_fn = vfswrap_symlink,
|
||||
.readlink_fn = vfswrap_readlink,
|
||||
.linkat_fn = vfswrap_linkat,
|
||||
.mknod_fn = vfswrap_mknod,
|
||||
.mknodat_fn = vfswrap_mknodat,
|
||||
.realpath_fn = vfswrap_realpath,
|
||||
.chflags_fn = vfswrap_chflags,
|
||||
|
@ -482,15 +482,6 @@ int vfs_not_implemented_linkat(vfs_handle_struct *handle,
|
||||
return -1;
|
||||
}
|
||||
|
||||
int vfs_not_implemented_mknod(vfs_handle_struct *handle,
|
||||
const struct smb_filename *smb_fname,
|
||||
mode_t mode,
|
||||
SMB_DEV_T dev)
|
||||
{
|
||||
errno = ENOSYS;
|
||||
return -1;
|
||||
}
|
||||
|
||||
int vfs_not_implemented_mknodat(vfs_handle_struct *handle,
|
||||
files_struct *dirfsp,
|
||||
const struct smb_filename *smb_fname,
|
||||
@ -1104,7 +1095,6 @@ static struct vfs_fn_pointers vfs_not_implemented_fns = {
|
||||
.symlink_fn = vfs_not_implemented_symlink,
|
||||
.readlink_fn = vfs_not_implemented_vfs_readlink,
|
||||
.linkat_fn = vfs_not_implemented_linkat,
|
||||
.mknod_fn = vfs_not_implemented_mknod,
|
||||
.mknodat_fn = vfs_not_implemented_mknodat,
|
||||
.realpath_fn = vfs_not_implemented_realpath,
|
||||
.chflags_fn = vfs_not_implemented_chflags,
|
||||
|
@ -2226,15 +2226,6 @@ int smb_vfs_call_linkat(struct vfs_handle_struct *handle,
|
||||
flags);
|
||||
}
|
||||
|
||||
int smb_vfs_call_mknod(struct vfs_handle_struct *handle,
|
||||
const struct smb_filename *smb_fname,
|
||||
mode_t mode,
|
||||
SMB_DEV_T dev)
|
||||
{
|
||||
VFS_FIND(mknod);
|
||||
return handle->fns->mknod_fn(handle, smb_fname, mode, dev);
|
||||
}
|
||||
|
||||
int smb_vfs_call_mknodat(struct vfs_handle_struct *handle,
|
||||
struct files_struct *dirfsp,
|
||||
const struct smb_filename *smb_fname,
|
||||
|
Loading…
x
Reference in New Issue
Block a user