-int
-xlog_print_trans_efd(xfs_caddr_t *ptr, uint len)
-{
- xfs_efd_log_format_t *f;
- xfs_efd_log_format_t lbuf;
- /* size without extents at end */
- uint core_size = sizeof(xfs_efd_log_format_t) - sizeof(xfs_extent_t);
-
- /*
- * memmove to ensure 8-byte alignment for the long longs in
- * xfs_efd_log_format_t structure
- */
- memmove(&lbuf, *ptr, MIN(core_size, len));
- f = &lbuf;
- *ptr += len;
- if (len >= core_size) {
- printf(_("EFD: #regs: %d num_extents: %d id: 0x%llx\n"),
- f->efd_size, f->efd_nextents, (unsigned long long)f->efd_efi_id);
-
- /* don't print extents as they are not used */
-
- return 0;
- } else {
- printf(_("EFD: Not enough data to decode further\n"));
- return 1;
- }
-} /* xlog_print_trans_efd */
-
-
-int
-xlog_print_trans_efi(xfs_caddr_t *ptr, uint src_len)
-{
- xfs_efi_log_format_t *src_f, *f;
- uint dst_len;
- xfs_extent_t *ex;
- int i;
- int error = 0;
-
- /*
- * memmove to ensure 8-byte alignment for the long longs in
- * xfs_efi_log_format_t structure
- */
- if ((src_f = (xfs_efi_log_format_t *)malloc(src_len)) == NULL) {
- fprintf(stderr, _("%s: xlog_print_trans_efi: malloc failed\n"), progname);
- exit(1);
- }
- memmove((char*)src_f, *ptr, src_len);
- *ptr += src_len;
-
- /* convert to native format */
- dst_len = sizeof(xfs_efi_log_format_t) + (src_f->efi_nextents - 1) * sizeof(xfs_extent_t);
- if ((f = (xfs_efi_log_format_t *)malloc(dst_len)) == NULL) {
- fprintf(stderr, _("%s: xlog_print_trans_efi: malloc failed\n"), progname);
- exit(1);
- }
- if (xfs_efi_copy_format((char*)src_f, src_len, f)) {
- error = 1;
- goto error;
- }
-
- printf(_("EFI: #regs: %d num_extents: %d id: 0x%llx\n"),
- f->efi_size, f->efi_nextents, (unsigned long long)f->efi_id);
- ex = f->efi_extents;
- for (i=0; i < f->efi_nextents; i++) {
- printf("(s: 0x%llx, l: %d) ",
- (unsigned long long)ex->ext_start, ex->ext_len);
- if (i % 4 == 3) printf("\n");
- ex++;
- }
- if (i % 4 != 0) printf("\n");
-error:
- free(src_f);
- free(f);
- return error;
-} /* xlog_print_trans_efi */
-
-
-int
-xlog_print_trans_qoff(xfs_caddr_t *ptr, uint len)