From: Kalpak Shah <Kalpak.Shah@Sun.COM>
To: TheodoreTso <tytso@mit.edu>
Cc: linux-ext4 <linux-ext4@vger.kernel.org>
Subject: [PATCH] Display bad depth in error message
Date: Wed, 21 May 2008 18:19:59 +0530 [thread overview]
Message-ID: <1211374199.7317.4.camel@localhost> (raw)
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
reply other threads:[~2008-05-21 12:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1211374199.7317.4.camel@localhost \
--to=kalpak.shah@sun.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox