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>
fprintf(stdout,
_("%s: optimizations made: %llu.\n"),
ctx->mntpoint, ctx->preens);
+ fflush(stdout);
}
static void
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, "");