summaryrefslogtreecommitdiffstats
path: root/sys/compat/linprocfs/linprocfs.c
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>2001-10-29 02:17:41 +0000
committerdillon <dillon@FreeBSD.org>2001-10-29 02:17:41 +0000
commitc7f4e768471c41e9a6b994986d89daf5fc0f0cb9 (patch)
tree5b38a53193e86418eecd53454c2185e84836a3e3 /sys/compat/linprocfs/linprocfs.c
parent830dbf12d9594406beedd41668c7f2755d92ff51 (diff)
downloadFreeBSD-src-c7f4e768471c41e9a6b994986d89daf5fc0f0cb9.zip
FreeBSD-src-c7f4e768471c41e9a6b994986d89daf5fc0f0cb9.tar.gz
promote tv_sec in printf to make it type agnostic
Diffstat (limited to 'sys/compat/linprocfs/linprocfs.c')
-rw-r--r--sys/compat/linprocfs/linprocfs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c
index bb38b51..c64bf11 100644
--- a/sys/compat/linprocfs/linprocfs.c
+++ b/sys/compat/linprocfs/linprocfs.c
@@ -408,7 +408,7 @@ linprocfs_dostat(PFS_FILL_ARGS)
"swap %u %u\n"
"intr %u\n"
"ctxt %u\n"
- "btime %ld\n",
+ "btime %lld\n",
T2J(cp_time[CP_USER]),
T2J(cp_time[CP_NICE]),
T2J(cp_time[CP_SYS] /*+ cp_time[CP_INTR]*/),
@@ -419,7 +419,7 @@ linprocfs_dostat(PFS_FILL_ARGS)
cnt.v_swappgsout,
cnt.v_intr,
cnt.v_swtch,
- boottime.tv_sec);
+ (quad_t)boottime.tv_sec);
return (0);
}
@@ -432,8 +432,8 @@ linprocfs_douptime(PFS_FILL_ARGS)
struct timeval tv;
getmicrouptime(&tv);
- sbuf_printf(sb, "%ld.%02ld %ld.%02ld\n",
- tv.tv_sec, tv.tv_usec / 10000,
+ sbuf_printf(sb, "%lld.%02ld %ld.%02ld\n",
+ (quad_t)tv.tv_sec, tv.tv_usec / 10000,
T2S(cp_time[CP_IDLE]), T2J(cp_time[CP_IDLE]) % 100);
return (0);
}
OpenPOWER on IntegriCloud