From: Theodore Ts'o Date: Wed, 16 Apr 2003 20:13:58 +0000 (-0400) Subject: Put stdout and stderr into non-buffered mode to X-Git-Tag: E2FSPROGS-1_33~11 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=2ecaaf655755898b9ce931ec5ac5daba25905886;p=tools%2Fe2fsprogs.git Put stdout and stderr into non-buffered mode to avoid cosmetic problems when running fsck under logsave. --- diff --git a/misc/ChangeLog b/misc/ChangeLog index 0712b2b..9e9d334 100644 --- a/misc/ChangeLog +++ b/misc/ChangeLog @@ -1,5 +1,8 @@ 2003-04-16 Theodore Ts'o + * fsck.c (main): Put stdout and stderr into non-buffered mode to + avoid cosmetic problems when running fsck under logsave. + * mke2fs.c (PRS): Avoid printing the version banner for mke2fs if the -q option is specified. (Addresses Debian bug #172716) diff --git a/misc/fsck.c b/misc/fsck.c index 5638a52..b069cd5 100644 --- a/misc/fsck.c +++ b/misc/fsck.c @@ -1192,6 +1192,9 @@ int main(int argc, char *argv[]) const char *fstab; struct fs_info *fs; + setvbuf(stdout, NULL, _IONBF, BUFSIZ); + setvbuf(stderr, NULL, _IONBF, BUFSIZ); + #ifdef ENABLE_NLS setlocale(LC_MESSAGES, ""); setlocale(LC_CTYPE, "");