From: Iustin Pop Date: Wed, 18 Jun 2008 20:26:26 +0000 (+0200) Subject: badblocks: fix a bug in the read throttling X-Git-Tag: v1.41-WIP-0707~20 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=edf261f6f859ed0ff3c16803ab61a78373089ad8;p=tools%2Fe2fsprogs.git 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 --- 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)