Change the flush logic for streams

Now stdout and stderr are always line buffered, and stdlog only
flushed on request.
This commit is contained in:
Andrea Mazzoleni 2015-02-03 18:29:11 +01:00
parent 80d51384ac
commit 798de7ca99
16 changed files with 40 additions and 20 deletions

View file

@ -103,7 +103,7 @@ void parity_overflow(struct snapraid_state* state, data_off_t size)
if (file->blockmax > 0) {
if (file->blockvec[file->blockmax - 1].parity_pos >= blockalloc) {
ftag("outofparity:%s:%s\n", disk->name, file->sub);
fflush(stdlog);
fflush_log();
if (first) {
first = 0;
printf("\nYour data requires more parity than the available space.\n");