diff options
author | Darrick J. Wong <djwong@kernel.org> | 2024-01-11 18:07:04 -0800 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2024-01-11 18:08:46 -0800 |
commit | 497ca97c1cefbd41b5f758ee66350995d0440897 (patch) | |
tree | a9414c2a5aca04da78f0410a5fe3c159a8e3a8c8 | |
parent | 52520522199efa984dcf172a3eb8d835b93e324e (diff) | |
download | xfsprogs-dev-497ca97c1cefbd41b5f758ee66350995d0440897.tar.gz |
xfs_scrub: flush stdout after printing to it
Make sure we flush stdout after printf'ing to it, especially before we
start any operation that could take a while to complete. Most of scrub
already does this, but we missed a couple of spots.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
-rw-r--r-- | scrub/xfs_scrub.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scrub/xfs_scrub.c b/scrub/xfs_scrub.c index a1b6754439..752180d646 100644 --- a/scrub/xfs_scrub.c +++ b/scrub/xfs_scrub.c @@ -535,6 +535,7 @@ _("%s: repairs made: %llu.\n"), fprintf(stdout, _("%s: optimizations made: %llu.\n"), ctx->mntpoint, ctx->preens); + fflush(stdout); } static void @@ -620,6 +621,7 @@ main( int error; fprintf(stdout, "EXPERIMENTAL xfs_scrub program in use! Use at your own risk!\n"); + fflush(stdout); progname = basename(argv[0]); setlocale(LC_ALL, ""); |