From 67c5a8af9ed128d8bb56d4723303aef6f0a4500f Mon Sep 17 00:00:00 2001 From: Christopher Ferris Date: Fri, 9 Jan 2015 15:56:21 -0800 Subject: [PATCH] Fix message when a command times out. The previous version printed out the nanoseconds elapsed, not seconds. Change-Id: I10f6d7bf7b7a4647658313ed83781fda6fd744a5 --- cmds/dumpstate/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmds/dumpstate/utils.c b/cmds/dumpstate/utils.c index e3042eb2b..81cdd121c 100644 --- a/cmds/dumpstate/utils.c +++ b/cmds/dumpstate/utils.c @@ -360,7 +360,7 @@ int run_command(const char *title, int timeout_seconds, const char *command, ... } if (timeout_seconds && elapsed / NANOS_PER_SEC > timeout_seconds) { - printf("*** %s: Timed out after %ds (killing pid %d)\n", command, (int) elapsed, pid); + printf("*** %s: Timed out after %.3fs (killing pid %d)\n", command, (float) elapsed / NANOS_PER_SEC, pid); kill(pid, SIGTERM); return -1; }