From ceecbc75c3bf90abf288338bde3037015681f8b8 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Sat, 31 Aug 2002 02:35:35 -0400 Subject: [PATCH] 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. --- e2fsck/ChangeLog | 7 +++++++ e2fsck/ehandler.c | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/e2fsck/ChangeLog b/e2fsck/ChangeLog index 14733dc..5eead5c 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 bd1643e..d4060c4 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; } -- 1.8.3.1