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

« back to all changes in this revision

Viewing changes to logprint/log_dump.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:
40
40
        for (blkno = 0; blkno < log->l_logBBsize; blkno++) {
41
41
                r = read(fd, buf, sizeof(buf));
42
42
                if (r < 0) {
43
 
                        fprintf(stderr, "%s: read error (%lld): %s\n",
 
43
                        fprintf(stderr, _("%s: read error (%lld): %s\n"),
44
44
                                __FUNCTION__, (long long)blkno,
45
45
                                strerror(errno));
46
46
                        continue;
47
47
                } else if (r == 0) {
48
 
                        printf("%s: physical end of log at %lld\n",
 
48
                        printf(_("%s: physical end of log at %lld\n"),
49
49
                                __FUNCTION__, (long long)blkno);
50
50
                        break;
51
51
                }
52
52
 
53
 
                if (CYCLE_LSN(INT_GET(*(xfs_lsn_t *)buf, ARCH_CONVERT)) ==
 
53
                if (CYCLE_LSN(be64_to_cpu(*(__be64 *)buf)) ==
54
54
                                XLOG_HEADER_MAGIC_NUM && !print_no_data) {
55
 
                        printf(
56
 
                "%6lld HEADER Cycle %d tail %d:%06d len %6d ops %d\n",
 
55
                        printf(_(
 
56
                "%6lld HEADER Cycle %d tail %d:%06d len %6d ops %d\n"),
57
57
                                (long long)blkno,
58
 
                                INT_GET(hdr->h_cycle, ARCH_CONVERT),
59
 
                                CYCLE_LSN(INT_GET(hdr->h_tail_lsn, ARCH_CONVERT)),
60
 
                                BLOCK_LSN(INT_GET(hdr->h_tail_lsn, ARCH_CONVERT)),
61
 
                                INT_GET(hdr->h_len, ARCH_CONVERT),
62
 
                                INT_GET(hdr->h_num_logops, ARCH_CONVERT));
 
58
                                be32_to_cpu(hdr->h_cycle),
 
59
                                CYCLE_LSN(be64_to_cpu(hdr->h_tail_lsn)),
 
60
                                BLOCK_LSN(be64_to_cpu(hdr->h_tail_lsn)),
 
61
                                be32_to_cpu(hdr->h_len),
 
62
                                be32_to_cpu(hdr->h_num_logops));
63
63
                }
64
64
 
65
 
                if (GET_CYCLE(buf, ARCH_CONVERT) != last_cycle) {
66
 
                        printf(
67
 
                "[%05lld - %05lld] Cycle 0x%08x New Cycle 0x%08x\n",
 
65
                if (xlog_get_cycle(buf) != last_cycle) {
 
66
                        printf(_(
 
67
                "[%05lld - %05lld] Cycle 0x%08x New Cycle 0x%08x\n"),
68
68
                                (long long)dupblkno, (long long)blkno,
69
 
                                last_cycle, GET_CYCLE(buf, ARCH_CONVERT));
70
 
                        last_cycle = GET_CYCLE(buf, ARCH_CONVERT);
 
69
                                last_cycle, xlog_get_cycle(buf));
 
70
                        last_cycle = xlog_get_cycle(buf);
71
71
                        dupblkno = blkno;
72
72
                }
73
73
        }