From cc4f98ed2deeaca33244fd77386e7d76917a3d30 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Thu, 3 Apr 2003 11:37:46 -0500 Subject: [PATCH] badblocks.c (bb_output): Flush output to the badblocks output file as bad blocks are discovered. --- misc/ChangeLog | 5 +++++ misc/badblocks.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/misc/ChangeLog b/misc/ChangeLog index f5e0de7..6815171 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 c6e308e..ba3db87 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) { -- 1.8.3.1