]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
Fix e2fsck and mke2fs -c to be pass the last _block change to badblocks
authorTheodore Ts'o <tytso@mit.edu>
Wed, 8 Nov 2006 05:41:50 +0000 (00:41 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 8 Nov 2006 05:41:50 +0000 (00:41 -0500)
Badblocks now interprets last_block argument as the last block to check,
instead of the number of blocks to check, to be consistent with the
badblocks man page.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
e2fsck/ChangeLog
e2fsck/badblocks.c
misc/ChangeLog
misc/mke2fs.c

index 6b035322a9806f508e77caa3ba1e68aead534fac..ce80f5cd1bae36d74a874d49598eb2dc8e5bf83c 100644 (file)
@@ -1,3 +1,9 @@
+2006-11-08  Theodore Tso  <tytso@mit.edu>
+
+       * badblocks.c (read_bad_blocks_file): Change the last_block
+               argument passed to the badblocks program to be consistent
+               with the change to badblocks.
+
 2006-10-21  Theodore Tso  <tytso@mit.edu>
 
        * pass2.c (parse_int_node): Don't core dump if there is a corrupt
index 68c320bdb29c6ed8d68164650f913fffca9d48a0..36dc208e54000f51e8adf2298662eb31dee80d5b 100644 (file)
@@ -75,7 +75,7 @@ void read_bad_blocks_file(e2fsck_t ctx, const char *bad_blocks_file,
                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,
index ed8d2fe769140d6a4c10ca0dabd6fb4f5bd19120..fb50257c165414abf2567de89bb68a0446aa02eb 100644 (file)
@@ -1,3 +1,9 @@
+2006-11-08  Theodore Tso  <tytso@mit.edu>
+
+       * mke2fs.c (test_disk): Change the last_block argument passed to
+               the badblocks program to be consistent with the change to
+               badblocks.
+
 2006-10-18  Theodore Tso  <tytso@mit.edu>
 
        * mke2fs.c: Fix revision 0 error checking so that it doesn't give
index b83aac1b43aeedbeeccbd5893b56ec8cad49f609..64e1a476ab7c44ea81b03db7c3a22dd04ff6228d 100644 (file)
@@ -191,7 +191,7 @@ static void test_disk(ext2_filsys fs, badblocks_list *bb_list)
 
        sprintf(buf, "badblocks -b %d -X %s%s%s %u", fs->blocksize,
                quiet ? "" : "-s ", (cflag > 1) ? "-w " : "",
-               fs->device_name, fs->super->s_blocks_count);
+               fs->device_name, fs->super->s_blocks_count-1);
        if (verbose)
                printf(_("Running command: %s\n"), buf);
        f = popen(buf, "r");