From: Andrey Albershteyn Date: Fri, 5 Dec 2025 15:02:15 +0000 (+0100) Subject: xfs: convert xfs_efi_log_format typedef to struct X-Git-Tag: v6.18.0~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=073e7103df195bb5312e8096942f85f0ed4d4d8e;p=thirdparty%2Fxfsprogs-dev.git xfs: convert xfs_efi_log_format typedef to struct Reviewed-by: Christoph Hellwig Signed-off-by: Andrey Albershteyn --- diff --git a/logprint/log_redo.c b/logprint/log_redo.c index e442d6f7..5581406d 100644 --- a/logprint/log_redo.c +++ b/logprint/log_redo.c @@ -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);