From: Theodore Ts'o Date: Thu, 3 Apr 2003 16:37:46 +0000 (-0500) Subject: badblocks.c (bb_output): Flush output to the badblocks X-Git-Tag: E2FSPROGS-1_33-WIP-0414~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc4f98ed2deeaca33244fd77386e7d76917a3d30;p=thirdparty%2Fe2fsprogs.git badblocks.c (bb_output): Flush output to the badblocks output file as bad blocks are discovered. --- diff --git a/misc/ChangeLog b/misc/ChangeLog index f5e0de77a..6815171e9 100644 --- a/misc/ChangeLog +++ b/misc/ChangeLog @@ -1,3 +1,8 @@ +2003-04-03 Theodore Ts'o + + * badblocks.c (bb_output): Flush output to the badblocks + output file as bad blocks are discovered. + 2003-03-25 Theodore Ts'o * chattr.1.in: Clarified the description of the 't' (no tail) diff --git a/misc/badblocks.c b/misc/badblocks.c index c6e308ee8..ba3db8754 100644 --- a/misc/badblocks.c +++ b/misc/badblocks.c @@ -87,7 +87,8 @@ static int bb_output (unsigned long bad) if (ext2fs_badblocks_list_test(bb_list, bad)) return 0; - fprintf (out, "%lu\n", bad); + fprintf(out, "%lu\n", bad); + fflush(out); errcode = ext2fs_badblocks_list_add (bb_list, bad); if (errcode) {