diff options
author | peter <peter@FreeBSD.org> | 2001-11-07 02:51:25 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2001-11-07 02:51:25 +0000 |
commit | b3c6f7a0d91ac9103ec06fa6bb60c983368a1f4e (patch) | |
tree | 5d71f16c9462dd9d115f9f489acf6d1b879a168f /sys/fs | |
parent | a4e77dae6a16c485e0262079fc4590c157667d97 (diff) | |
download | FreeBSD-src-b3c6f7a0d91ac9103ec06fa6bb60c983368a1f4e.zip FreeBSD-src-b3c6f7a0d91ac9103ec06fa6bb60c983368a1f4e.tar.gz |
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.
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/procfs/procfs_status.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/fs/procfs/procfs_status.c b/sys/fs/procfs/procfs_status.c index 7c3122c..ee5cc7b 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, |