summaryrefslogtreecommitdiffstats
path: root/sys-utils/hwclock.c
diff options
context:
space:
mode:
authorAlexey Galakhov2015-04-16 17:26:27 +0200
committerKarel Zak2015-04-27 10:26:18 +0200
commitff229538902c4dd6d0a552d6a4223f077789dee2 (patch)
treeee89999d89cfd837c8dc5c2770e8230c95a4233a /sys-utils/hwclock.c
parenthwclock: Remove TZUTC (diff)
downloadkernel-qcow2-util-linux-ff229538902c4dd6d0a552d6a4223f077789dee2.tar.gz
kernel-qcow2-util-linux-ff229538902c4dd6d0a552d6a4223f077789dee2.tar.xz
kernel-qcow2-util-linux-ff229538902c4dd6d0a552d6a4223f077789dee2.zip
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 <agalakhov@gmail.com>
Diffstat (limited to 'sys-utils/hwclock.c')
-rw-r--r--sys-utils/hwclock.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c
index f4784a157..ccbdace45 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);
}