~ubuntu-branches/ubuntu/utopic/xfsprogs/utopic-proposed

« back to all changes in this revision

Viewing changes to libxlog/util.c

  • Committer: Bazaar Package Importer
  • Author(s): Nathan Scott
  • Date: 2009-05-06 11:29:18 UTC
  • mfrom: (8.1.1 jaunty)
  • Revision ID: james.westby@ubuntu.com-20090506112918-uzoyzcp90rtr8td7
Tags: 3.0.2
New bugfix release

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
{
49
49
    if (print_record_header)
50
50
        printf(_("\nLOG REC AT LSN cycle %d block %d (0x%x, 0x%x)\n"),
51
 
               CYCLE_LSN(INT_GET(head->h_lsn, ARCH_CONVERT)),
52
 
               BLOCK_LSN(INT_GET(head->h_lsn, ARCH_CONVERT)),
53
 
               CYCLE_LSN(INT_GET(head->h_lsn, ARCH_CONVERT)),
54
 
               BLOCK_LSN(INT_GET(head->h_lsn, ARCH_CONVERT)));
 
51
               CYCLE_LSN(be64_to_cpu(head->h_lsn)),
 
52
               BLOCK_LSN(be64_to_cpu(head->h_lsn)),
 
53
               CYCLE_LSN(be64_to_cpu(head->h_lsn)),
 
54
               BLOCK_LSN(be64_to_cpu(head->h_lsn)));
55
55
 
56
 
    if (INT_GET(head->h_magicno, ARCH_CONVERT) != XLOG_HEADER_MAGIC_NUM) {
 
56
    if (be32_to_cpu(head->h_magicno) != XLOG_HEADER_MAGIC_NUM) {
57
57
 
58
58
        printf(_("* ERROR: bad magic number in log header: 0x%x\n"),
59
 
                INT_GET(head->h_magicno, ARCH_CONVERT));
 
59
                be32_to_cpu(head->h_magicno));
60
60
 
61
61
    } else if (header_check_uuid(mp, head)) {
62
62
 
63
63
        /* failed - fall through */
64
64
 
65
 
    } else if (INT_GET(head->h_fmt, ARCH_CONVERT) != XLOG_FMT) {
 
65
    } else if (be32_to_cpu(head->h_fmt) != XLOG_FMT) {
66
66
 
67
67
        printf(_("* ERROR: log format incompatible (log=%d, ours=%d)\n"),
68
 
                INT_GET(head->h_fmt, ARCH_CONVERT), XLOG_FMT);
 
68
                be32_to_cpu(head->h_fmt), XLOG_FMT);
69
69
 
70
70
    } else {
71
71
        /* everything is ok */