From: Alexey Galakhov Date: Thu, 16 Apr 2015 15:26:27 +0000 (+0200) Subject: hwclock: flush stdout in hwclock -c X-Git-Tag: v2.26.2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e514cb54e321a689bb9dfde8f89b8ff745c0a077;p=thirdparty%2Futil-linux.git hwclock: flush stdout in hwclock -c This allows using hwclock -c in automated test scripts that parse its output line-by-line. The standard output is flushed before each 10 second delay. Signed-off-by: Alexey Galakhov --- diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c index 1cc3bd2dd3..c9d422d35c 100644 --- a/sys-utils/hwclock.c +++ b/sys-utils/hwclock.c @@ -1525,6 +1525,7 @@ static int compare_clock (const bool utc, const bool local_opt) printf("hw-time system-time freq-offset-ppm tick\n"); printf("%10.0f %10.6f\n", (double) time1_hw, time1_sys); } + fflush(stdout); sleep(10); }