summaryrefslogtreecommitdiffstats
path: root/usr.bin/truss
diff options
context:
space:
mode:
authorjh <jh@FreeBSD.org>2009-12-21 17:41:57 +0000
committerjh <jh@FreeBSD.org>2009-12-21 17:41:57 +0000
commit34da792643dd7a35711b8f459a0df8c2c11a3499 (patch)
tree079801c69c468412456af5c2aedaeb6fc8ec5f99 /usr.bin/truss
parent2eaf7d742e7999689ccc8edeeb25f202005b82dc (diff)
downloadFreeBSD-src-34da792643dd7a35711b8f459a0df8c2c11a3499.zip
FreeBSD-src-34da792643dd7a35711b8f459a0df8c2c11a3499.tar.gz
Cast time_t values to intmax_t and use %jd with printf.
OK'ed by: delphij Approved by: trasz (mentor)
Diffstat (limited to 'usr.bin/truss')
-rw-r--r--usr.bin/truss/syscalls.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/truss/syscalls.c b/usr.bin/truss/syscalls.c
index b5286ea..28df6d0 100644
--- a/usr.bin/truss/syscalls.c
+++ b/usr.bin/truss/syscalls.c
@@ -1161,15 +1161,15 @@ print_summary(struct trussinfo *trussinfo)
ncall = nerror = 0;
for (sc = syscalls; sc->name != NULL; sc++)
if (sc->ncalls) {
- fprintf(trussinfo->outfile, "%-20s%5d.%09ld%8d%8d\n",
- sc->name, sc->time.tv_sec, sc->time.tv_nsec,
- sc->ncalls, sc->nerror);
+ fprintf(trussinfo->outfile, "%-20s%5jd.%09ld%8d%8d\n",
+ sc->name, (intmax_t)sc->time.tv_sec,
+ sc->time.tv_nsec, sc->ncalls, sc->nerror);
timespecadd(&total, &sc->time, &total);
ncall += sc->ncalls;
nerror += sc->nerror;
}
fprintf(trussinfo->outfile, "%20s%15s%8s%8s\n",
"", "-------------", "-------", "-------");
- fprintf(trussinfo->outfile, "%-20s%5d.%09ld%8d%8d\n",
- "", total.tv_sec, total.tv_nsec, ncall, nerror);
+ fprintf(trussinfo->outfile, "%-20s%5jd.%09ld%8d%8d\n",
+ "", (intmax_t)total.tv_sec, total.tv_nsec, ncall, nerror);
}
OpenPOWER on IntegriCloud