From 9f10a7b31e57288093930fc9565102409eeac6e9 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Fri, 16 Jul 1999 10:41:36 +0000 Subject: [PATCH] ChangeLog, badblocks.c: 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 | 6 ++++++ misc/badblocks.c | 5 ++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/misc/ChangeLog b/misc/ChangeLog index 3ba47a8..29415a8 100644 --- a/misc/ChangeLog +++ b/misc/ChangeLog @@ -1,3 +1,9 @@ +1999-07-08 + + * 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 * uuidgen.c: Add option parsing so that user can ask for either a diff --git a/misc/badblocks.c b/misc/badblocks.c index d312cd2..bd3f223 100644 --- a/misc/badblocks.c +++ b/misc/badblocks.c @@ -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; } -- 1.8.3.1