]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
When testing a disk using e2fsck -c, use the list
authorTheodore Ts'o <tytso@mit.edu>
Tue, 2 Dec 2003 12:56:42 +0000 (07:56 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 2 Dec 2003 12:56:42 +0000 (07:56 -0500)
of new bad blocks to replace the current list of bad
blocks.  This way "e2fsck -c" can be used to recover from
a corrupted bad block inode.

e2fsck/ChangeLog
e2fsck/badblocks.c
e2fsck/e2fsck.h
e2fsck/unix.c

index 31c900129e35719c62c68ebb2f1b41083509d15e..5c9427b5ee0054b1062a8aa1ade7989c91dac08d 100644 (file)
@@ -1,3 +1,14 @@
+2003-12-02  Theodore Ts'o  <tytso@mit.edu>
+
+       * unix.c (main): When testing a disk using e2fsck -c, use the list
+               of new bad blocks to replace the current list of bad
+               blocks.  This way "e2fsck -c" can be used to recover from
+               a corrupted bad block inode.
+
+       * badblocks.c (test_disk): Remove the test_disk() file; e2fsck
+               will just call read_bad_blocks_file() directly with the
+               file parameter set to NULL.
+
 2003-09-14  Theodore Ts'o  <tytso@mit.edu>
 
        * unix.c (is_on_batt, check_if_skip): If running on battery, then
index 92aa3c11121acee8c738aa2c3e831456b0c53407..572af203fc469687b51a66a8b610e28f78e0523d 100644 (file)
@@ -113,11 +113,6 @@ fatal:
        
 }
 
-void test_disk(e2fsck_t ctx)
-{
-       read_bad_blocks_file(ctx, 0, 0);
-}
-
 static int check_bb_inode_blocks(ext2_filsys fs, blk_t *block_nr, int blockcnt,
                                 void *priv_data)
 {
index 779835c0133b4fa19a1732a2ac978733881040c3..695f463b593b118b676dad52d41f2292b6bfff34 100644 (file)
@@ -359,7 +359,6 @@ extern int e2fsck_run(e2fsck_t ctx);
 /* badblock.c */
 extern void read_bad_blocks_file(e2fsck_t ctx, const char *bad_blocks_file,
                                 int replace_bad_blocks);
-extern void test_disk(e2fsck_t ctx);
 
 /* dirinfo.c */
 extern void e2fsck_add_dir_info(e2fsck_t ctx, ext2_ino_t ino, ext2_ino_t parent);
index c61f3e424d0a3f0f62a911d32db228920f9cd49c..91511bfb67b834baaf92e7d2f5aa171414249c8f 100644 (file)
@@ -1034,7 +1034,7 @@ restart:
        if (bad_blocks_file)
                read_bad_blocks_file(ctx, bad_blocks_file, replace_bad_blocks);
        else if (cflag)
-               test_disk(ctx);
+               read_bad_blocks_file(ctx, 0, 1); /* Test disk */
        if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
                fatal_error(ctx, 0);
 #ifdef ENABLE_SWAPFS