Commit 6c70bbcb authored by Jeremy Hylton's avatar Jeremy Hylton

Switch lines that size and offset appear on.

If you grep for just the Trans lines, it's probably more useful to
have the size than the offset.  Maybe.
parent 06e757b3
......@@ -41,15 +41,14 @@ def fsdump(path, file=None, with_offset=1):
iter = FileIterator(path)
for trans in iter:
if with_offset:
print >> file, ("Trans #%05d tid=%016x time=%s offset=%d"
print >> file, ("Trans #%05d tid=%016x time=%s size=%d"
% (i, u64(trans.tid), str(TimeStamp(trans.tid)),
trans._pos))
trans._tend - trans._pos))
else:
print >> file, "Trans #%05d tid=%016x time=%s" % \
(i, u64(trans.tid), str(TimeStamp(trans.tid)))
print >> file, "\tsize=%d status=%s user=%s description=%s" % \
(trans._tend - trans._tpos, `trans.status`, trans.user,
trans.description)
print >> file, "\toffset=%d status=%s user=%s description=%s" % \
(trans._tpos, `trans.status`, trans.user, trans.description)
j = 0
tsize = 0
for rec in trans:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment