]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: convert xfs_efi_log_format typedef to struct
authorAndrey Albershteyn <aalbersh@redhat.com>
Fri, 5 Dec 2025 15:02:15 +0000 (16:02 +0100)
committerAndrey Albershteyn <aalbersh@kernel.org>
Mon, 8 Dec 2025 17:03:15 +0000 (18:03 +0100)
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrey Albershteyn <aalbersh@kernel.org>
logprint/log_redo.c

index e442d6f7cd272082ec586f773d5d318ab1dfef94..5581406d432bab36c2571dff24fd3a454d53bd60 100644 (file)
@@ -19,7 +19,7 @@ xfs_efi_copy_format(
        int                       continued)
 {
        uint i;
-       uint nextents = ((xfs_efi_log_format_t *)buf)->efi_nextents;
+       uint nextents = ((struct xfs_efi_log_format *)buf)->efi_nextents;
        uint dst_len = xfs_efi_log_format_sizeof(nextents);
        uint len32 = xfs_efi_log_format32_sizeof(nextents);
        uint len64 = xfs_efi_log_format64_sizeof(nextents);
@@ -63,23 +63,24 @@ xfs_efi_copy_format(
 
 int
 xlog_print_trans_efi(
-       char                    **ptr,
-       uint                    src_len,
-       int                     continued)
+       char                            **ptr,
+       uint                            src_len,
+       int                             continued)
 {
-       const char              *item_name = "EFI?";
-       xfs_efi_log_format_t    *src_f, *f = NULL;
-       uint                    dst_len;
-       xfs_extent_t            *ex;
-       int                     i;
-       int                     error = 0;
-       int                     core_size = offsetof(xfs_efi_log_format_t, efi_extents);
+       const char                      *item_name = "EFI?";
+       struct xfs_efi_log_format       *src_f, *f = NULL;
+       uint                            dst_len;
+       xfs_extent_t                    *ex;
+       int                             i;
+       int                             error = 0;
+       int                             core_size = offsetof(
+                       struct xfs_efi_log_format, efi_extents);
 
        /*
         * memmove to ensure 8-byte alignment for the long longs in
-        * xfs_efi_log_format_t structure
+        * xfs_efi_log_format structure
         */
-       if ((src_f = (xfs_efi_log_format_t *)malloc(src_len)) == NULL) {
+       if ((src_f = (struct xfs_efi_log_format *)malloc(src_len)) == NULL) {
                fprintf(stderr, _("%s: xlog_print_trans_efi: malloc failed\n"), progname);
                exit(1);
        }
@@ -95,7 +96,7 @@ xlog_print_trans_efi(
                goto error;
        }
 
-       if ((f = (xfs_efi_log_format_t *)malloc(dst_len)) == NULL) {
+       if ((f = (struct xfs_efi_log_format *)malloc(dst_len)) == NULL) {
                fprintf(stderr, _("%s: xlog_print_trans_efi: malloc failed\n"), progname);
                exit(1);
        }
@@ -135,15 +136,15 @@ error:
 
 void
 xlog_recover_print_efi(
-       struct xlog_recover_item *item)
+       struct xlog_recover_item        *item)
 {
-       const char              *item_name = "EFI?";
-       xfs_efi_log_format_t    *f, *src_f;
-       xfs_extent_t            *ex;
-       int                     i;
-       uint                    src_len, dst_len;
+       const char                      *item_name = "EFI?";
+       struct xfs_efi_log_format       *f, *src_f;
+       xfs_extent_t                    *ex;
+       int                             i;
+       uint                            src_len, dst_len;
 
-       src_f = (xfs_efi_log_format_t *)item->ri_buf[0].iov_base;
+       src_f = (struct xfs_efi_log_format *)item->ri_buf[0].iov_base;
        src_len = item->ri_buf[0].iov_len;
        /*
         * An xfs_efi_log_format structure contains a variable length array
@@ -151,9 +152,9 @@ xlog_recover_print_efi(
         * Each element is of size xfs_extent_32_t or xfs_extent_64_t.
         * Need to convert to native format.
         */
-       dst_len = sizeof(xfs_efi_log_format_t) +
+       dst_len = sizeof(struct xfs_efi_log_format) +
                (src_f->efi_nextents) * sizeof(xfs_extent_t);
-       if ((f = (xfs_efi_log_format_t *)malloc(dst_len)) == NULL) {
+       if ((f = (struct xfs_efi_log_format *)malloc(dst_len)) == NULL) {
                fprintf(stderr, _("%s: xlog_recover_print_efi: malloc failed\n"),
                        progname);
                exit(1);