vfs: Remove a typedef
authorVolker Lendecke <vl@samba.org>
Fri, 3 Jun 2022 12:47:30 +0000 (14:47 +0200)
committerJeremy Allison <jra@samba.org>
Mon, 6 Jun 2022 19:22:28 +0000 (19:22 +0000)
We want to get rid of struct typedefs, and this was quick

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/include/vfs.h
source3/modules/vfs_ceph.c
source3/modules/vfs_default.c
source3/smbd/proto.h
source3/smbd/smb2_trans2.c
source3/smbd/statvfs.c

index ac6a3017f80804d5d0102d95cb67ca5b5980f770..be4712689eb6eabeec4122265a13f36c91d7a74c 100644 (file)
@@ -1313,7 +1313,7 @@ typedef struct vfs_handle_struct {
 } vfs_handle_struct;
 
 
-typedef struct vfs_statvfs_struct {
+struct vfs_statvfs_struct {
        /* For undefined recommended transfer size return -1 in that field */
        uint32_t OptimalTransferSize;  /* bsize on some os, iosize on other os */
        uint32_t BlockSize;
@@ -1340,7 +1340,7 @@ typedef struct vfs_statvfs_struct {
        /* NB flags can come from FILE_SYSTEM_DEVICE_INFO call   */
 
        int FsCapabilities;
-} vfs_statvfs_struct;
+};
 
 /* Add a new FSP extension of the given type. Returns a pointer to the
  * extenstion data.
index 8132f5ba8b183aa211aa6367ac62dbe93caf2a24..145829052122f91c2916b002473f83212a8d2015 100644 (file)
@@ -263,8 +263,8 @@ static int cephwrap_set_quota(struct vfs_handle_struct *handle,  enum SMB_QUOTA_
 }
 
 static int cephwrap_statvfs(struct vfs_handle_struct *handle,
-                               const struct smb_filename *smb_fname,
-                               vfs_statvfs_struct *statbuf)
+                           const struct smb_filename *smb_fname,
+                           struct vfs_statvfs_struct *statbuf)
 {
        struct statvfs statvfs_buf;
        int ret;
index d67a9fe43252d65242fbacaaca075ec31ea2a834..8e6cbfd3707192ad8aa12b607cf078b7fb74cf38 100644 (file)
@@ -117,8 +117,8 @@ static int vfswrap_get_shadow_copy_data(struct vfs_handle_struct *handle,
 }
 
 static int vfswrap_statvfs(struct vfs_handle_struct *handle,
-                               const struct smb_filename *smb_fname,
-                               vfs_statvfs_struct *statbuf)
+                          const struct smb_filename *smb_fname,
+                          struct vfs_statvfs_struct *statbuf)
 {
        return sys_statvfs(smb_fname->base_name, statbuf);
 }
index f7c5c620a1bdc7a5c3d613784969daebeaefc495..166317f7965fe4becb2659b3a20b891bbb6c73b6 100644 (file)
@@ -1103,7 +1103,7 @@ bool reset_stat_cache( void );
 
 /* The following definitions come from smbd/statvfs.c  */
 
-int sys_statvfs(const char *path, vfs_statvfs_struct *statbuf);
+int sys_statvfs(const char *path, struct vfs_statvfs_struct *statbuf);
 
 /* The following definitions come from smbd/trans2.c  */
 
index 77bcfe33e13ec56f77af9f71efa3554b2280e8eb..cc6dc3adcf7ec82d8e7039b6ff106a23f0c1f4b8 100644 (file)
@@ -2599,7 +2599,7 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)bsize, (unsigned
                case SMB_QUERY_POSIX_FS_INFO:
                {
                        int rc;
-                       vfs_statvfs_struct svfs;
+                       struct vfs_statvfs_struct svfs;
 
                        if (!lp_smb1_unix_extensions()) {
                                return NT_STATUS_INVALID_LEVEL;
index aca6752c7fb46075ed8077d409538d7ab6830d5a..981e7a5ba79d3bd7418884ff047689aa37b5370c 100644 (file)
@@ -115,7 +115,7 @@ static int bsd_statvfs(const char *path, vfs_statvfs_struct *statbuf)
        return ret;
 }
 #elif defined(STAT_STATVFS) && defined(HAVE_FSID_INT)
-static int posix_statvfs(const char *path, vfs_statvfs_struct *statbuf)
+static int posix_statvfs(const char *path, struct vfs_statvfs_struct *statbuf)
 {
        struct statvfs statvfs_buf;
        int result;
@@ -164,7 +164,7 @@ static int posix_statvfs(const char *path, vfs_statvfs_struct *statbuf)
  between LSB and FreeBSD/POSIX.1 (IEEE Std 1003.1-2001) we need to abstract the interface
  so that particular OS would use its preferred interface.
 */
-int sys_statvfs(const char *path, vfs_statvfs_struct *statbuf)
+int sys_statvfs(const char *path, struct vfs_statvfs_struct *statbuf)
 {
 #if defined(BSD_STYLE_STATVFS)
        return bsd_statvfs(path, statbuf);