From: Theodore Ts'o Date: Sat, 31 Aug 2002 06:35:35 +0000 (-0400) Subject: ehandler.c (e2fsck_handle_read_error): If the user asks to X-Git-Tag: E2FSPROGS-1_28~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ceecbc75c3bf90abf288338bde3037015681f8b8;p=thirdparty%2Fe2fsprogs.git ehandler.c (e2fsck_handle_read_error): If the user asks to ignore the error, offer to try forcing a write of the block to the disk; sometimes this will cause the drive to remap the bad block. --- diff --git a/e2fsck/ChangeLog b/e2fsck/ChangeLog index 14733dc8c..5eead5cc8 100644 --- a/e2fsck/ChangeLog +++ b/e2fsck/ChangeLog @@ -1,3 +1,10 @@ +2002-08-31 Theodore Ts'o + + * ehandler.c (e2fsck_handle_read_error): If the user asks to + ignore the error, offer to try forcing a write of the + block to the disk; sometimes this will cause the drive to + remap the bad block. + 2002-08-31 Theodore Ts'o * pass2.c (e2fsck_pass2): If this is a HTREE directory, sort the diff --git a/e2fsck/ehandler.c b/e2fsck/ehandler.c index bd1643e7e..d4060c402 100644 --- a/e2fsck/ehandler.c +++ b/e2fsck/ehandler.c @@ -56,8 +56,11 @@ static errcode_t e2fsck_handle_read_error(io_channel channel, printf(_("Error reading block %lu (%s). "), block, error_message(error)); preenhalt(ctx); - if (ask(ctx, _("Ignore error"), 1)) + if (ask(ctx, _("Ignore error"), 1)) { + if (ask(ctx, _("Force rewrite"), 1)) + io_channel_write_blk(channel, block, 1, data); return 0; + } return error; }