#endif
#define STATIC static
#define XFS_ERROR(e) (e)
+#ifdef DEBUG
+#define XFS_ERROR_REPORT(e,l,mp) fprintf(stderr, "ERROR: %s\n", e)
+#else
#define XFS_ERROR_REPORT(e,l,mp) ((void) 0)
+#endif
#define XFS_CORRUPTION_ERROR(e,l,mp,m) ((void) 0)
#define unlikely(x) (x)
#define min(a,b) ((a) < (b) ? (a) : (b))
int print_block_start)
{
xfs_daddr_t head_blk, tail_blk;
+ int error;
- if (xlog_find_tail(log, &head_blk, &tail_blk, 0))
+ if ((error = xlog_find_tail(log, &head_blk, &tail_blk, 0))) {
+ fprintf(stderr, "%s: failed to find head and tail, error: %d\n",
+ progname, error);
exit(1);
+ }
printf(" log tail: %lld head: %lld state: %s\n",
(long long)tail_blk,
if (head_blk == tail_blk)
return;
- if (xlog_do_recovery_pass(log, head_blk, tail_blk, XLOG_RECOVER_PASS1))
+ if ((error = xlog_do_recovery_pass(log, head_blk, tail_blk, XLOG_RECOVER_PASS1))) {
+ fprintf(stderr, "%s: failed in xfs_do_recovery_pass, error: %d\n",
+ progname, error);
exit(1);
+ }
}