From 4ff021c69941f14c4733d0f6b75f2d21b333b275 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Wed, 7 Nov 2001 02:51:25 +0000 Subject: [PATCH] Fix printf format bugs introduced in rev 1.34 for printing times. quad_t cannot be printed with %lld on 64 bit systems. Dont waste cpu to round user and system times up to long long, it is highly improbable that a process will have accumulated 68 years of user or system cpu time (not wall clock time) before a reboot or process restart. --- sys/fs/procfs/procfs_status.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/fs/procfs/procfs_status.c b/sys/fs/procfs/procfs_status.c index 7c3122c9d3b6..ee5cc7b9f0f2 100644 --- a/sys/fs/procfs/procfs_status.c +++ b/sys/fs/procfs/procfs_status.c @@ -139,11 +139,11 @@ procfs_dostatus(curp, p, pfs, uio) calcru(p, &ut, &st, (struct timeval *) NULL); mtx_unlock_spin(&sched_lock); ps += snprintf(ps, psbuf + sizeof(psbuf) - ps, - " %lld,%ld %lld,%ld %lld,%ld", - (quad_t)p->p_stats->p_start.tv_sec, + " %lld,%ld %ld,%ld %ld,%ld", + (long long)p->p_stats->p_start.tv_sec, p->p_stats->p_start.tv_usec, - (quad_t)ut.tv_sec, ut.tv_usec, - (quad_t)st.tv_sec, st.tv_usec); + (long)ut.tv_sec, ut.tv_usec, + (long)st.tv_sec, st.tv_usec); } else { mtx_unlock_spin(&sched_lock); ps += snprintf(ps, psbuf + sizeof(psbuf) - ps,