1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-27 16:39:08 +00:00

"Fix" printf format issues by using %j

Sponsored by:	DARPA & NAI Labs.
This commit is contained in:
Poul-Henning Kamp 2002-09-13 11:41:25 +00:00
parent 53706245bb
commit c51f3753df
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=103284
3 changed files with 8 additions and 5 deletions

View File

@ -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);
}

View File

@ -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;

View File

@ -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,