From: Theodore Ts'o Date: Sat, 25 Sep 2010 02:05:58 +0000 (-0400) Subject: debugfs: Make the extents listing in the stat command more concise X-Git-Tag: v1.41.13~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a9468442350b4c1e6e029493bfbc1a840b1f7efe;p=thirdparty%2Fe2fsprogs.git debugfs: Make the extents listing in the stat command more concise Use "[u]" instead of "[uninit]" and limit the amount of detail printed for the extent tree blocks, so it is more similar to the format used for direct/indirect mapped inodes. Signed-off-by: "Theodore Ts'o" --- diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c index 5019fe703..a10714abc 100644 --- a/debugfs/debugfs.c +++ b/debugfs/debugfs.c @@ -633,11 +633,8 @@ static void dump_extents(FILE *f, const char *prefix, ext2_ino_t ino, continue; } - fprintf(f, "%s(ETB l%d/n%d, %lld-%lld, blk %lld)", + fprintf(f, "%s(ETB%d):%lld", printed ? ", " : "", info.curr_level, - info.curr_entry, - extent.e_lblk, - extent.e_lblk + (extent.e_len - 1), extent.e_pblk); printed = 1; continue; @@ -666,20 +663,20 @@ static void dump_extents(FILE *f, const char *prefix, ext2_ino_t ino, continue; else if (extent.e_len == 1) fprintf(f, - "%s(%lld%s): %lld", + "%s(%lld%s):%lld", printed ? ", " : "", extent.e_lblk, extent.e_flags & EXT2_EXTENT_FLAGS_UNINIT ? - " [uninit]" : "", + "[u]" : "", extent.e_pblk); else fprintf(f, - "%s(%lld-%lld%s): %lld-%lld", + "%s(%lld-%lld%s):%lld-%lld", printed ? ", " : "", extent.e_lblk, extent.e_lblk + (extent.e_len - 1), extent.e_flags & EXT2_EXTENT_FLAGS_UNINIT ? - " [uninit]" : "", + "[u]" : "", extent.e_pblk, extent.e_pblk + (extent.e_len - 1)); printed = 1;