Util-Linux package development
 help / color / mirror / Atom feed
* [PATCH] hwclock: flush stdout in hwclock -c
@ 2015-04-16 15:26 Alexey Galakhov
  2015-04-20  0:34 ` J William Piggott
  2015-04-27  8:27 ` Karel Zak
  0 siblings, 2 replies; 11+ messages in thread
From: Alexey Galakhov @ 2015-04-16 15:26 UTC (permalink / raw)
  To: util-linux; +Cc: Alexey Galakhov

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@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-04-28 11:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-16 15:26 [PATCH] hwclock: flush stdout in hwclock -c Alexey Galakhov
2015-04-20  0:34 ` J William Piggott
2015-04-20  7:28   ` Alexey Galakhov
2015-04-21 15:19     ` J William Piggott
2015-04-21 15:50       ` Alexey Galakhov
2015-04-21 19:12         ` J William Piggott
2015-04-27  8:27 ` Karel Zak
2015-04-27 21:27   ` J William Piggott
2015-04-27 21:42     ` Alexey Galakhov
2015-04-28  6:50       ` Bernhard Voelker
2015-04-28 11:27       ` J William Piggott

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox