diff options
author | des <des@FreeBSD.org> | 2002-07-15 16:05:15 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2002-07-15 16:05:15 +0000 |
commit | 71010f625753d17bf8b4862855f05a2743e0f93a (patch) | |
tree | 95098f74715e623bc6dce74ff9d53cb81b7d900c /usr.sbin | |
parent | 2cb3bd675e598f91b0bf2af63cffb62153b7a0d0 (diff) | |
download | FreeBSD-src-71010f625753d17bf8b4862855f05a2743e0f93a.zip FreeBSD-src-71010f625753d17bf8b4862855f05a2743e0f93a.tar.gz |
Get rid of %qd, and unbreak Alpha build.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/sa/main.c | 6 | ||||
-rw-r--r-- | usr.sbin/sa/pdb.c | 9 | ||||
-rw-r--r-- | usr.sbin/sa/usrdb.c | 12 |
3 files changed, 16 insertions, 11 deletions
diff --git a/usr.sbin/sa/main.c b/usr.sbin/sa/main.c index 684d951..1910c4f 100644 --- a/usr.sbin/sa/main.c +++ b/usr.sbin/sa/main.c @@ -49,6 +49,7 @@ static const char rcsid[] = #include <err.h> #include <fcntl.h> #include <signal.h> +#include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -361,10 +362,11 @@ acct_load(pn, wr) if (sflag || (mflag && !qflag)) usracct_add(&ci); } else if (!qflag) - printf("%6lu %12.2f cpu %12quk mem %12qu io %s\n", + printf("%6lu %12.2f cpu %12juk mem %12ju io %s\n", ci.ci_uid, (ci.ci_utime + ci.ci_stime) / (double) AHZ, - ci.ci_mem, ci.ci_io, ci.ci_comm); + (uintmax_t)ci.ci_mem, (uintmax_t)ci.ci_io, + ci.ci_comm); } /* finally, return the file descriptor for possible truncation */ diff --git a/usr.sbin/sa/pdb.c b/usr.sbin/sa/pdb.c index 87347b0..423bf9e 100644 --- a/usr.sbin/sa/pdb.c +++ b/usr.sbin/sa/pdb.c @@ -38,6 +38,7 @@ static const char rcsid[] = #include <err.h> #include <errno.h> #include <fcntl.h> +#include <stdint.h> #include <stdio.h> #include <string.h> #include "extern.h" @@ -309,7 +310,7 @@ check_junk(cip) char *cp; size_t len; - fprintf(stderr, "%s (%qu) -- ", cip->ci_comm, cip->ci_calls); + fprintf(stderr, "%s (%ju) -- ", cip->ci_comm, (uintmax_t)cip->ci_calls); cp = fgetln(stdin, &len); return (cp && (cp[0] == 'y' || cp[0] == 'Y')) ? 1 : 0; @@ -343,7 +344,7 @@ print_ci(cip, totalcip) } else uflow = 0; - printf("%8qu ", cip->ci_calls); + printf("%8ju ", (uintmax_t)cip->ci_calls); if (cflag) { if (cip != totalcip) printf(" %4.2f%% ", @@ -410,12 +411,12 @@ print_ci(cip, totalcip) } if (Dflag) - printf("%10qutio ", cip->ci_io); + printf("%10jutio ", (uintmax_t)cip->ci_io); else printf("%8.0favio ", cip->ci_io / c); if (Kflag) - printf("%10quk*sec ", cip->ci_mem); + printf("%10juk*sec ", (uintmax_t)cip->ci_mem); else printf("%8.0fk ", cip->ci_mem / t); diff --git a/usr.sbin/sa/usrdb.c b/usr.sbin/sa/usrdb.c index 3bce1bd..d4ed500 100644 --- a/usr.sbin/sa/usrdb.c +++ b/usr.sbin/sa/usrdb.c @@ -40,6 +40,7 @@ static const char rcsid[] = #include <errno.h> #include <fcntl.h> #include <pwd.h> +#include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -238,8 +239,8 @@ usracct_print() while (rv == 0) { memcpy(ui, data.data, sizeof(struct userinfo)); - printf("%-*s %9qu ", MAXLOGNAME - 1, - user_from_uid(ui->ui_uid, 0), ui->ui_calls); + printf("%-*s %9ju ", MAXLOGNAME - 1, + user_from_uid(ui->ui_uid, 0), (uintmax_t)ui->ui_calls); t = (double) (ui->ui_utime + ui->ui_stime) / (double) AHZ; @@ -250,15 +251,16 @@ usracct_print() /* ui->ui_calls is always != 0 */ if (dflag) - printf("%12qu%s", ui->ui_io / ui->ui_calls, "avio"); + printf("%12ju%s", + (uintmax_t)(ui->ui_io / ui->ui_calls), "avio"); else - printf("%12qu%s", ui->ui_io, "tio"); + printf("%12ju%s", (uintmax_t)ui->ui_io, "tio"); /* t is always >= 0.0001; see above */ if (kflag) printf("%12.0f%s", ui->ui_mem / t, "k"); else - printf("%12qu%s", ui->ui_mem, "k*sec"); + printf("%12ju%s", (uintmax_t)ui->ui_mem, "k*sec"); printf("\n"); |