[PATCH] hwclock: flush stdout in hwclock -c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <agalakhov@xxxxxxxxx>
---
 sys-utils/hwclock.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c
index e1e5816..4cdb2ea 100644
--- a/sys-utils/hwclock.c
+++ b/sys-utils/hwclock.c
@@ -1532,6 +1532,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.3.5

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux