From e514cb54e321a689bb9dfde8f89b8ff745c0a077 Mon Sep 17 00:00:00 2001 From: Alexey Galakhov Date: Thu, 16 Apr 2015 17:26:27 +0200 Subject: [PATCH] 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 --- sys-utils/hwclock.c | 1 + 1 file changed, 1 insertion(+) 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); } -- 2.47.2