]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
debugfs: Make the extents listing in the stat command more concise
authorTheodore Ts'o <tytso@mit.edu>
Sat, 25 Sep 2010 02:05:58 +0000 (22:05 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 25 Sep 2010 02:05:58 +0000 (22:05 -0400)
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" <tytso@mit.edu>
debugfs/debugfs.c

index 5019fe7032cd0fb003c1cb960e26ca13e500caaa..a10714abceb981f99cf4b92a20713825442675ce 100644 (file)
@@ -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;