[PATCH 29/33] xfs: convert xfs_efi_log_format typedef to struct

Andrey Albershteyn
2025-12-03T19:10:51Z

logprint/log_redo.c | 47 ++++++++++++++++++++++++-----------------------
1 file changed, 24 insertions(+), 23 deletions(-)

diff --git a/logprint/log_redo.c b/logprint/log_redo.c
index e442d6f7cd..5581406d43 100644
--- a/logprint/log_redo.c
+++ b/logprint/log_redo.c
@@ -19,7 +19,7 @@
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 @@

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 @@
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 @@

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 @@
* 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);

--
- Andrey