From a7db422c5c0b7abaf040f6b6ac81de30e14b2704 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 4 Aug 2015 07:36:55 +0100 Subject: [PATCH] Print newlines between times/pings. qemu doesn't flush the serial out until we print a newline. --- watchdog-test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/watchdog-test.c b/watchdog-test.c index f184659..77ee178 100644 --- a/watchdog-test.c +++ b/watchdog-test.c @@ -149,13 +149,13 @@ main (int argc, char *argv[]) time (&t); if (t - start_t > watchdog_timeout * 2) break; - printf ("%d... ", (int) (t - start_t)); + printf ("%d...\n", (int) (t - start_t)); sync (); sleep (3); - printf ("ping "); + printf ("ping\n"); if (ioctl (fd, WDIOC_KEEPALIVE, 0) == -1) perror ("\nioctl: WDIOC_KEEPALIVE"); } @@ -170,7 +170,7 @@ main (int argc, char *argv[]) time (&start_t); for (;;) { time (&t); - printf ("%d... ", (int) (t - start_t)); + printf ("%d...\n", (int) (t - start_t)); sync (); sleep (3); } -- 1.8.3.1