Whamcloud - gitweb
Put stdout and stderr into non-buffered mode to
authorTheodore Ts'o <tytso@mit.edu>
Wed, 16 Apr 2003 20:13:58 +0000 (16:13 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 16 Apr 2003 20:13:58 +0000 (16:13 -0400)
avoid cosmetic problems when running fsck under logsave.

misc/ChangeLog
misc/fsck.c

index 0712b2b..9e9d334 100644 (file)
@@ -1,5 +1,8 @@
 2003-04-16  Theodore Ts'o  <tytso@mit.edu>
 
+       * 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) 
 
index 5638a52..b069cd5 100644 (file)
@@ -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, "");