]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
badblocks: honor the -s option when in read-only -t mode
authorTheodore Ts'o <tytso@mit.edu>
Fri, 17 Feb 2012 19:28:39 +0000 (14:28 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 17 Feb 2012 20:28:21 +0000 (15:28 -0500)
Addresses-Debian-Bug: #646629

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

index 57882416a8ae48c9d9358b1aa7be9c4b6691fc51..890d51071bef286e8addbc3ac6bcfb0a99e84176 100644 (file)
@@ -517,11 +517,10 @@ static unsigned int test_ro (int dev, blk_t last_block,
        try = blocks_at_once;
        currently_testing = first_block;
        num_blocks = last_block - 1;
-       if (!t_flag && (s_flag || v_flag)) {
+       if (!t_flag && (s_flag || v_flag))
                fputs(_("Checking for bad blocks (read-only test): "), stderr);
-               if (v_flag <= 1)
-                       alarm_intr(SIGALRM);
-       }
+       if (s_flag && v_flag <= 1)
+               alarm_intr(SIGALRM);
        while (currently_testing < last_block)
        {
                if (max_bb && bb_count >= max_bb) {