From: Alexey Galakhov Date: Thu, 16 Apr 2015 15:26:27 +0000 (+0200) Subject: hwclock: flush stdout in hwclock -c X-Git-Tag: v2.27-rc1~229 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff229538902c4dd6d0a552d6a4223f077789dee2;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 f4784a157e..ccbdace45b 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); }