All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Display bad depth in error message
@ 2008-05-21 12:49 Kalpak Shah
  0 siblings, 0 replies; only message in thread
From: Kalpak Shah @ 2008-05-21 12:49 UTC (permalink / raw)
  To: TheodoreTso; +Cc: linux-ext4

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@sun.com>

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-05-21 12:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-21 12:49 [PATCH] Display bad depth in error message Kalpak Shah

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.