diff options
author | phk <phk@FreeBSD.org> | 2002-09-13 11:41:25 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-09-13 11:41:25 +0000 |
commit | 238e3d325507fc228dd938ae173eb4d9d1a8f9c7 (patch) | |
tree | cffe7a7f5a3206872b13ed25e1ba810c6364a8d4 | |
parent | 39330dc632633393578de07de7d1e1faf9768680 (diff) | |
download | FreeBSD-src-238e3d325507fc228dd938ae173eb4d9d1a8f9c7.zip FreeBSD-src-238e3d325507fc228dd938ae173eb4d9d1a8f9c7.tar.gz |
"Fix" printf format issues by using %j
Sponsored by: DARPA & NAI Labs.
-rw-r--r-- | sys/geom/geom_bsd.c | 5 | ||||
-rw-r--r-- | sys/geom/geom_disk.c | 3 | ||||
-rw-r--r-- | sys/geom/geom_pc98.c | 5 |
3 files changed, 8 insertions, 5 deletions
diff --git a/sys/geom/geom_bsd.c b/sys/geom/geom_bsd.c index 22151db..61eaaf3 100644 --- a/sys/geom/geom_bsd.c +++ b/sys/geom/geom_bsd.c @@ -52,6 +52,7 @@ #include <sys/lock.h> #include <sys/mutex.h> #endif +#include <sys/stdint.h> #include <sys/errno.h> #include <sys/disklabel.h> #include <geom/geom.h> @@ -288,8 +289,8 @@ g_bsd_dumpconf(struct sbuf *sb, char *indent, struct g_geom *gp, struct g_consum gsp = gp->softc; ms = gsp->softc; if (pp == NULL && cp == NULL) { - sbuf_printf(sb, "%s<labeloffset>%lld</labeloffset>\n", - indent, ms->labeloffset); + sbuf_printf(sb, "%s<labeloffset>%jd</labeloffset>\n", + indent, (intmax_t)ms->labeloffset); } g_slice_dumpconf(sb, indent, gp, cp, pp); } diff --git a/sys/geom/geom_disk.c b/sys/geom/geom_disk.c index acbee24..d4091ef 100644 --- a/sys/geom/geom_disk.c +++ b/sys/geom/geom_disk.c @@ -46,6 +46,7 @@ #include <sys/disk.h> #include <sys/malloc.h> #include <sys/sysctl.h> +#include <sys/stdint.h> #include <machine/md_var.h> #include <sys/ctype.h> @@ -106,7 +107,7 @@ g_disk_kerneldump(struct bio *bp, struct disk *dp) struct dumperinfo di; gkd = (struct g_kerneldump*)bp->bio_data; - printf("Kerneldump off=%lld len=%lld\n", gkd->offset, gkd->length); + printf("Kerneldump off=%jd len=%jd\n", (intmax_t)gkd->offset, (intmax_t)gkd->length); di.dumper = (dumper_t *)dp->d_devsw->d_dump; di.priv = dp->d_dev; di.blocksize = dp->d_label.d_secsize; diff --git a/sys/geom/geom_pc98.c b/sys/geom/geom_pc98.c index 1592404..949ce55 100644 --- a/sys/geom/geom_pc98.c +++ b/sys/geom/geom_pc98.c @@ -52,6 +52,7 @@ #include <sys/lock.h> #include <sys/mutex.h> #endif +#include <sys/stdint.h> #include <sys/errno.h> #include <geom/geom.h> #include <geom/geom_slice.h> @@ -158,8 +159,8 @@ g_pc98_taste(struct g_class *mp, struct g_provider *pp, int flags) g_hexdump(buf+512 + i * 32, 32); start = v * fwsect * fwhead * sectorsize; length = (u - v) * fwsect * fwhead * sectorsize; - printf("c%d - c%d (%llx - %llx) = %s\n", - v, u, start, length, buf + 512 + 16 + i * 32); + printf("c%d - c%d (%jx - %jx) = %s\n", + v, u, (uintmax_t)start, (uintmax_t)length, buf + 512 + 16 + i * 32); npart++; pp2 = g_slice_addslice(gp, i, start, length, |