[PATCH] Display bad depth in error message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

It would be good to actually print the bad htree depth as part of the error message.

Signed-off-by: Kalpak Shah <kalpak.shah@xxxxxxx>

Index: e2fsprogs-1.40.7/e2fsck/pass2.c
===================================================================
--- e2fsprogs-1.40.7.orig/e2fsck/pass2.c
+++ e2fsprogs-1.40.7/e2fsck/pass2.c
@@ -213,6 +213,7 @@ void e2fsck_pass2(e2fsck_t ctx)
                        if (dx_db->type == DX_DIRBLOCK_LEAF) {
                                depth = htree_depth(dx_dir, dx_db);
                                if (depth != dx_dir->depth) {
+                                       pctx.num = dx_dir->depth;
                                        code = PR_2_HTREE_BAD_DEPTH;
                                        fix_problem(ctx, code, &pctx);
                                        bad_dir++;
Index: e2fsprogs-1.40.7/e2fsck/problem.c
===================================================================
--- e2fsprogs-1.40.7.orig/e2fsck/problem.c
+++ e2fsprogs-1.40.7/e2fsck/problem.c
@@ -1288,7 +1288,7 @@ static struct e2fsck_problem problem_tab

        /* Node in HTREE directory has invalid depth */
        { PR_2_HTREE_BAD_DEPTH,
-         N_("@p @h %d: node (%B) has @n depth\n"),
+         N_("@p @h %d: node (%B) has @n depth (%N)\n"),
          PROMPT_NONE, 0 },

        /* Duplicate directory entry found */

Thanks,
Kalpak

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux