VFS: Add SMB_VFS_FNTIMES
[samba.git] / examples / VFS / skel_opaque.c
index b74f7360dde661e6ecef88f6cba2b4934375a140..a8deb8a6da622bcb797c900deb23fb2a95a02d37 100644 (file)
@@ -362,14 +362,6 @@ static int skel_unlinkat(vfs_handle_struct *handle,
        return -1;
 }
 
-static int skel_chmod(vfs_handle_struct *handle,
-                       const struct smb_filename *smb_fname,
-                       mode_t mode)
-{
-       errno = ENOSYS;
-       return -1;
-}
-
 static int skel_fchmod(vfs_handle_struct *handle, files_struct *fsp,
                       mode_t mode)
 {
@@ -415,6 +407,14 @@ static int skel_ntimes(vfs_handle_struct *handle,
        return -1;
 }
 
+static int skel_fntimes(vfs_handle_struct *handle,
+                       files_struct *fsp,
+                       struct smb_file_time *ft)
+{
+       errno = ENOSYS;
+       return -1;
+}
+
 static int skel_ftruncate(vfs_handle_struct *handle, files_struct *fsp,
                          off_t offset)
 {
@@ -620,10 +620,9 @@ static NTSTATUS skel_offload_write_recv(struct vfs_handle_struct *handle,
        return NT_STATUS_OK;
 }
 
-static NTSTATUS skel_get_compression(struct vfs_handle_struct *handle,
+static NTSTATUS skel_fget_compression(struct vfs_handle_struct *handle,
                                     TALLOC_CTX *mem_ctx,
                                     struct files_struct *fsp,
-                                    struct smb_filename *smb_fname,
                                     uint16_t *_compression_fmt)
 {
        return NT_STATUS_INVALID_DEVICE_REQUEST;
@@ -715,13 +714,6 @@ static NTSTATUS skel_readdir_attr(struct vfs_handle_struct *handle,
        return NT_STATUS_NOT_IMPLEMENTED;
 }
 
-static NTSTATUS skel_get_dos_attributes(struct vfs_handle_struct *handle,
-                               struct smb_filename *smb_fname,
-                               uint32_t *dosmode)
-{
-       return NT_STATUS_NOT_IMPLEMENTED;
-}
-
 struct skel_get_dos_attributes_state {
        struct vfs_aio_state aio_state;
        uint32_t dosmode;
@@ -774,13 +766,6 @@ static NTSTATUS skel_fget_dos_attributes(struct vfs_handle_struct *handle,
        return NT_STATUS_NOT_IMPLEMENTED;
 }
 
-static NTSTATUS skel_set_dos_attributes(struct vfs_handle_struct *handle,
-                               const struct smb_filename *smb_fname,
-                               uint32_t dosmode)
-{
-       return NT_STATUS_NOT_IMPLEMENTED;
-}
-
 static NTSTATUS skel_fset_dos_attributes(struct vfs_handle_struct *handle,
                                struct files_struct *fsp,
                                uint32_t dosmode)
@@ -847,16 +832,9 @@ static int skel_sys_acl_blob_get_fd(vfs_handle_struct *handle,
        return -1;
 }
 
-static int skel_sys_acl_set_file(vfs_handle_struct *handle,
-                               const struct smb_filename *smb_fname,
-                               SMB_ACL_TYPE_T acltype,
-                               SMB_ACL_T theacl)
-{
-       errno = ENOSYS;
-       return -1;
-}
-
-static int skel_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
+static int skel_sys_acl_set_fd(vfs_handle_struct *handle,
+                              struct files_struct *fsp,
+                              SMB_ACL_TYPE_T type,
                               SMB_ACL_T theacl)
 {
        errno = ENOSYS;
@@ -940,15 +918,6 @@ static ssize_t skel_fgetxattr(vfs_handle_struct *handle,
        return -1;
 }
 
-static ssize_t skel_listxattr(vfs_handle_struct *handle,
-                               const struct smb_filename *smb_fname,
-                               char *list,
-                               size_t size)
-{
-       errno = ENOSYS;
-       return -1;
-}
-
 static ssize_t skel_flistxattr(vfs_handle_struct *handle,
                               struct files_struct *fsp, char *list,
                               size_t size)
@@ -957,14 +926,6 @@ static ssize_t skel_flistxattr(vfs_handle_struct *handle,
        return -1;
 }
 
-static int skel_removexattr(vfs_handle_struct *handle,
-                       const struct smb_filename *smb_fname,
-                       const char *name)
-{
-       errno = ENOSYS;
-       return -1;
-}
-
 static int skel_fremovexattr(vfs_handle_struct *handle,
                             struct files_struct *fsp, const char *name)
 {
@@ -972,17 +933,6 @@ static int skel_fremovexattr(vfs_handle_struct *handle,
        return -1;
 }
 
-static int skel_setxattr(vfs_handle_struct *handle,
-                       const struct smb_filename *smb_fname,
-                       const char *name,
-                       const void *value,
-                       size_t size,
-                       int flags)
-{
-       errno = ENOSYS;
-       return -1;
-}
-
 static int skel_fsetxattr(vfs_handle_struct *handle, struct files_struct *fsp,
                          const char *name, const void *value, size_t size,
                          int flags)
@@ -1087,13 +1037,13 @@ static struct vfs_fn_pointers skel_opaque_fns = {
        .lstat_fn = skel_lstat,
        .get_alloc_size_fn = skel_get_alloc_size,
        .unlinkat_fn = skel_unlinkat,
-       .chmod_fn = skel_chmod,
        .fchmod_fn = skel_fchmod,
        .fchown_fn = skel_fchown,
        .lchown_fn = skel_lchown,
        .chdir_fn = skel_chdir,
        .getwd_fn = skel_getwd,
        .ntimes_fn = skel_ntimes,
+       .fntimes_fn = skel_fntimes,
        .ftruncate_fn = skel_ftruncate,
        .fallocate_fn = skel_fallocate,
        .lock_fn = skel_lock,
@@ -1113,7 +1063,7 @@ static struct vfs_fn_pointers skel_opaque_fns = {
        .offload_read_recv_fn = skel_offload_read_recv,
        .offload_write_send_fn = skel_offload_write_send,
        .offload_write_recv_fn = skel_offload_write_recv,
-       .get_compression_fn = skel_get_compression,
+       .fget_compression_fn = skel_fget_compression,
        .set_compression_fn = skel_set_compression,
 
        .streaminfo_fn = skel_streaminfo,
@@ -1128,11 +1078,9 @@ static struct vfs_fn_pointers skel_opaque_fns = {
        .audit_file_fn = skel_audit_file,
 
        /* DOS attributes. */
-       .get_dos_attributes_fn = skel_get_dos_attributes,
        .get_dos_attributes_send_fn = skel_get_dos_attributes_send,
        .get_dos_attributes_recv_fn = skel_get_dos_attributes_recv,
        .fget_dos_attributes_fn = skel_fget_dos_attributes,
-       .set_dos_attributes_fn = skel_set_dos_attributes,
        .fset_dos_attributes_fn = skel_fset_dos_attributes,
 
        /* NT ACL operations. */
@@ -1147,7 +1095,6 @@ static struct vfs_fn_pointers skel_opaque_fns = {
        .sys_acl_get_fd_fn = skel_sys_acl_get_fd,
        .sys_acl_blob_get_file_fn = skel_sys_acl_blob_get_file,
        .sys_acl_blob_get_fd_fn = skel_sys_acl_blob_get_fd,
-       .sys_acl_set_file_fn = skel_sys_acl_set_file,
        .sys_acl_set_fd_fn = skel_sys_acl_set_fd,
        .sys_acl_delete_def_file_fn = skel_sys_acl_delete_def_file,
 
@@ -1156,11 +1103,8 @@ static struct vfs_fn_pointers skel_opaque_fns = {
        .getxattrat_send_fn = skel_getxattrat_send,
        .getxattrat_recv_fn = skel_getxattrat_recv,
        .fgetxattr_fn = skel_fgetxattr,
-       .listxattr_fn = skel_listxattr,
        .flistxattr_fn = skel_flistxattr,
-       .removexattr_fn = skel_removexattr,
        .fremovexattr_fn = skel_fremovexattr,
-       .setxattr_fn = skel_setxattr,
        .fsetxattr_fn = skel_fsetxattr,
 
        /* aio operations */