Whamcloud - gitweb
Merge branch 'maint' into next
[tools/e2fsprogs.git] / e2fsck / badblocks.c
index 09ef3ab..36dc208 100644 (file)
@@ -72,10 +72,10 @@ void read_bad_blocks_file(e2fsck_t ctx, const char *bad_blocks_file,
                        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,
@@ -126,7 +126,8 @@ static int check_bb_inode_blocks(ext2_filsys fs,
         */
        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;
        }