From edf261f6f859ed0ff3c16803ab61a78373089ad8 Mon Sep 17 00:00:00 2001 From: Iustin Pop Date: Wed, 18 Jun 2008 22:26:26 +0200 Subject: [PATCH] badblocks: fix a bug in the read throttling The previous patch was missing an #include and thus the compiler didn't catch the (now obvious) error. Signed-off-by: Iustin Pop Signed-off-by: Theodore Ts'o --- misc/badblocks.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/misc/badblocks.c b/misc/badblocks.c index 6bd95bd..15fe5af 100644 --- a/misc/badblocks.c +++ b/misc/badblocks.c @@ -48,6 +48,7 @@ extern int optind; #include #include +#include #include #include @@ -285,10 +286,10 @@ static int do_read (int dev, unsigned char * buffer, int try, int block_size, /* Try the read */ if (d_flag) - gettimeofday(&tv1); + gettimeofday(&tv1, NULL); got = read (dev, buffer, try * block_size); if (d_flag) - gettimeofday(&tv2); + gettimeofday(&tv2, NULL); if (got < 0) got = 0; if (got & 511) -- 1.8.3.1