+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
}
-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)
{
/* 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);
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