goto fatal;
}
} else {
- sprintf(buf, "badblocks -b %d %s%s%s %d", fs->blocksize,
+ sprintf(buf, "badblocks -b %d -X %s%s%s %d", fs->blocksize,
(ctx->options & E2F_OPT_PREEN) ? "" : "-s ",
(ctx->options & E2F_OPT_WRITECHECK) ? "-n " : "",
- fs->device_name, fs->super->s_blocks_count);
+ fs->device_name, fs->super->s_blocks_count-1);
f = popen(buf, "r");
if (!f) {
com_err("read_bad_blocks_file", errno,
*/
if (*block_nr >= fs->super->s_blocks_count ||
*block_nr < fs->super->s_first_data_block) {
- printf(_("Warning illegal block %u found in bad block inode. Cleared.\n"), *block_nr);
+ printf(_("Warning: illegal block %u found in bad block inode. "
+ "Cleared.\n"), *block_nr);
*block_nr = 0;
return BLOCK_CHANGED;
}