summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1999-08-06 07:03:25 +0000
committerbde <bde@FreeBSD.org>1999-08-06 07:03:25 +0000
commit2dc04dd2d74821b0d573c8e84fd05cf7f8bfbee8 (patch)
tree3cee6793de2b8c33862f0b6cb7736cc0d7cd0ea9 /usr.sbin
parent2b43a0b4ec1ff19e2d93196795b83fbfc0ae3b9e (diff)
downloadFreeBSD-src-2dc04dd2d74821b0d573c8e84fd05cf7f8bfbee8.zip
FreeBSD-src-2dc04dd2d74821b0d573c8e84fd05cf7f8bfbee8.tar.gz
Fixed printf format errors. One of them fixes the garbage output for
sa -km reported in the PR. PR: 4582
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/sa/usrdb.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/sa/usrdb.c b/usr.sbin/sa/usrdb.c
index d3a0654..d441fca 100644
--- a/usr.sbin/sa/usrdb.c
+++ b/usr.sbin/sa/usrdb.c
@@ -30,7 +30,7 @@
#ifndef lint
static const char rcsid[] =
- "$Id$";
+ "$Id: usrdb.c,v 1.6 1997/10/15 06:41:19 charnier Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -133,13 +133,13 @@ usracct_add(ci)
rv = DB_GET(usracct_db, &key, &data, 0);
if (rv < 0) {
- warn("get key %d from user accounting stats", uid);
+ warn("get key %lu from user accounting stats", uid);
return (-1);
} else if (rv == 0) { /* it's there; copy whole thing */
/* add the old data to the new data */
bcopy(data.data, &newui, data.size);
if (newui.ui_uid != uid) {
- warnx("key %d != expected record number %d",
+ warnx("key %lu != expected record number %lu",
newui.ui_uid, uid);
warnx("inconsistent user accounting stats");
return (-1);
@@ -159,7 +159,7 @@ usracct_add(ci)
data.size = sizeof newui;
rv = DB_PUT(usracct_db, &key, &data, 0);
if (rv < 0) {
- warn("add key %d to user accounting stats", uid);
+ warn("add key %lu to user accounting stats", uid);
return (-1);
} else if (rv != 0) {
warnx("DB_PUT returned 1");
@@ -254,7 +254,7 @@ usracct_print()
/* t is always >= 0.0001; see above */
if (kflag)
- printf("%12qu%s", ui->ui_mem / t, "k");
+ printf("%12.0f%s", ui->ui_mem / t, "k");
else
printf("%12qu%s", ui->ui_mem, "k*sec");
OpenPOWER on IntegriCloud