From 5e72cdbeb9cfe32ddff1293cc672dcf66f4f2d5b Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Fri, 8 Nov 2002 15:35:13 -0500 Subject: [PATCH] unix.c (PRS), journal.c: Set the default level of journal debugging to be 0, and allow the user to set the level of journal debugging by using the E2FSCK_JBD_DEBUG environment variable. --- e2fsck/ChangeLog | 5 +++++ e2fsck/journal.c | 1 - e2fsck/unix.c | 8 ++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/e2fsck/ChangeLog b/e2fsck/ChangeLog index 8e32eeb..9c7a43c 100644 --- a/e2fsck/ChangeLog +++ b/e2fsck/ChangeLog @@ -1,5 +1,10 @@ 2002-11-08 + * unix.c (PRS), journal.c: Set the default level of journal + debugging to be 0, and allow the user to set the level of + journal debugging by using the E2FSCK_JBD_DEBUG + environment variable. + * pass1.c (new_table_block), super.c (check_super_block), swapfs.c (swap_filesys): Clear EXT2_FLAG_MASTER_SB_ONLY to make sure the backup superblocks and group descriptors are diff --git a/e2fsck/journal.c b/e2fsck/journal.c index a6a8426..f3399f9 100644 --- a/e2fsck/journal.c +++ b/e2fsck/journal.c @@ -27,7 +27,6 @@ #ifdef CONFIG_JBD_DEBUG /* Enabled by configure --enable-jfs-debug */ static int bh_count = 0; -int journal_enable_debug = 2; #endif /* diff --git a/e2fsck/unix.c b/e2fsck/unix.c index bee6636..241f048 100644 --- a/e2fsck/unix.c +++ b/e2fsck/unix.c @@ -53,6 +53,10 @@ static char *bad_blocks_file = 0; e2fsck_t e2fsck_global_ctx; /* Try your very best not to use this! */ +#ifdef CONFIG_JBD_DEBUG /* Enabled by configure --enable-jfs-debug */ +int journal_enable_debug = -1; +#endif + static void usage(e2fsck_t ctx) { fprintf(stderr, @@ -727,6 +731,10 @@ static errcode_t PRS(int argc, char *argv[], e2fsck_t *ret_ctx) } else putenv (PATH_SET); } +#ifdef CONFIG_JBD_DEBUG + if (getenv("E2FSCK_JBD_DEBUG")) + journal_enable_debug = atoi(getenv("E2FSCK_JBD_DEBUG")); +#endif return 0; } -- 1.8.3.1