Whamcloud - gitweb
ChangeLog, badblocks.c:
authorTheodore Ts'o <tytso@mit.edu>
Fri, 16 Jul 1999 10:41:36 +0000 (10:41 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 16 Jul 1999 10:41:36 +0000 (10:41 +0000)
  badblocks.c (do_test): Don't complain if the write error occurs on a
   non-block boundary.  This is perfectly common when using blocksizes
   larger than 1k.

misc/ChangeLog
misc/badblocks.c

index 3ba47a8..29415a8 100644 (file)
@@ -1,3 +1,9 @@
+1999-07-08    <tytso@rsts-11.mit.edu>
+
+       * badblocks.c (do_test): Don't complain if the write error occurs
+               on a non-block boundary.  This is perfectly common when
+               using blocksizes larger than 1k.
+
 1999-07-03    <tytso@valinux.com>
 
        * uuidgen.c: Add option parsing so that user can ask for either a
index d312cd2..bd3f223 100644 (file)
@@ -99,10 +99,9 @@ static long do_test (int dev, char * buffer, int try, unsigned long block_size,
        got = read (dev, buffer, try * block_size);
        if (got < 0)
                got = 0;        
-       if (got & (block_size - 1))
+       if (got & 511)
                fprintf (stderr,
-                        "Weird value (%ld) in do_test: probably bugs\n",
-                        got);
+                        "Weird value (%ld) in do_test\n", got);
        got /= block_size;
        return got;
 }