summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2013-06-10 04:44:30 +0000
committerguenther <guenther@openbsd.org>2013-06-10 04:44:30 +0000
commitde9f02b440951fbac81dc59cac70879dd501fd78 (patch)
treec8c0a2a189e393f387fedbbf6f550a70bac88e75
parentspelling in comment fix (for real, there's no code change here). (diff)
downloadwireguard-openbsd-de9f02b440951fbac81dc59cac70879dd501fd78.tar.xz
wireguard-openbsd-de9f02b440951fbac81dc59cac70879dd501fd78.zip
Switch from timeval to timespec introduced format error; fix by prepping
for big time_t and casting to long long ok deraadt@
-rw-r--r--sys/kern/tty.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index b3f87146101..1fb032f5878 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.98 2013/06/03 16:55:22 guenther Exp $ */
+/* $OpenBSD: tty.c,v 1.99 2013/06/10 04:44:30 guenther Exp $ */
/* $NetBSD: tty.c,v 1.68.4.2 1996/06/06 16:04:52 thorpej Exp $ */
/*-
@@ -2169,13 +2169,14 @@ ttyinfo(struct tty *tp)
}
ttyprintf(tp,
- " cmd: %s %d [%s] %ld.%02ldu %ld.%02lds %d%% %ldk\n",
+ " cmd: %s %d [%s] %lld.%02ldu %lld.%02lds %d%% %ldk\n",
pick->p_comm, pick->p_pid,
pick->p_stat == SONPROC ? "running" :
pick->p_stat == SRUN ? "runnable" :
pick->p_wmesg ? pick->p_wmesg : "iowait",
- utime.tv_sec, utime.tv_nsec / 10000000,
- stime.tv_sec, stime.tv_nsec / 10000000, pctcpu / 100, rss);
+ (long long)utime.tv_sec, utime.tv_nsec / 10000000,
+ (long long)stime.tv_sec, stime.tv_nsec / 10000000,
+ pctcpu / 100, rss);
}
tp->t_rocount = 0; /* so pending input will be retyped if BS */
}