From 00449ae2c89df0807f9824122b97dc14aff5e0b1 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Sat, 15 Sep 2007 20:06:39 +0000 Subject: [PATCH] Fix some kprintf format warnings. --- sys/dev/disk/sbp/sbp.c | 14 +++----------- sys/dev/disk/vpo/vpo.c | 6 +++--- sys/dev/raid/vinum/vinumrequest.c | 8 ++++---- 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/sys/dev/disk/sbp/sbp.c b/sys/dev/disk/sbp/sbp.c index f998218e08..b2486efca4 100644 --- a/sys/dev/disk/sbp/sbp.c +++ b/sys/dev/disk/sbp/sbp.c @@ -32,7 +32,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/firewire/sbp.c,v 1.74 2004/01/08 14:58:09 simokawa Exp $ - * $DragonFly: src/sys/dev/disk/sbp/sbp.c,v 1.23 2007/05/01 00:05:17 dillon Exp $ + * $DragonFly: src/sys/dev/disk/sbp/sbp.c,v 1.24 2007/09/15 20:06:38 swildner Exp $ * */ @@ -2375,19 +2375,11 @@ kprintf("ORB %08x %08x %08x %08x\n", ntohl(ocb->orb[4]), ntohl(ocb->orb[5]), nto break; } SBP_DEBUG(1) - kprintf("%s:%d:%d:%d:XPT_CALC_GEOMETRY: " -#if defined(__DragonFly__) || __FreeBSD_version < 500000 - "Volume size = %d\n", -#else - "Volume size = %jd\n", -#endif + kprintf("%s:%d:%d:%d:XPT_CALC_GEOMETRY: Volume size = %ju\n", device_get_nameunit(sbp->fd.dev), cam_sim_path(sbp->sim), ccb->ccb_h.target_id, ccb->ccb_h.target_lun, -#if defined(__FreeBSD__) && __FreeBSD_version >= 500000 - (uintmax_t) -#endif - ccg->volume_size); + (uintmax_t)ccg->volume_size); END_DEBUG #if defined(__DragonFly__) || __FreeBSD_version < 501100 diff --git a/sys/dev/disk/vpo/vpo.c b/sys/dev/disk/vpo/vpo.c index e783b16634..0e589f722c 100644 --- a/sys/dev/disk/vpo/vpo.c +++ b/sys/dev/disk/vpo/vpo.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ppbus/vpo.c,v 1.20.2.1 2000/05/07 21:08:18 n_hibma Exp $ - * $DragonFly: src/sys/dev/disk/vpo/vpo.c,v 1.9 2006/12/22 23:26:17 swildner Exp $ + * $DragonFly: src/sys/dev/disk/vpo/vpo.c,v 1.10 2007/09/15 20:06:39 swildner Exp $ */ #include @@ -356,10 +356,10 @@ vpo_action(struct cam_sim *sim, union ccb *ccb) ccg = &ccb->ccg; #ifdef VP0_DEBUG - kprintf("vpo%d: XPT_CALC_GEOMETRY (bs=%d,vs=%d,c=%d,h=%d,spt=%d) request\n", + kprintf("vpo%d: XPT_CALC_GEOMETRY (bs=%d,vs=%ju,c=%d,h=%d,spt=%d) request\n", vpo->vpo_unit, ccg->block_size, - ccg->volume_size, + (uintmax_t)ccg->volume_size, ccg->cylinders, ccg->heads, ccg->secs_per_track); diff --git a/sys/dev/raid/vinum/vinumrequest.c b/sys/dev/raid/vinum/vinumrequest.c index 6592f3541f..9e089f7f14 100644 --- a/sys/dev/raid/vinum/vinumrequest.c +++ b/sys/dev/raid/vinum/vinumrequest.c @@ -39,7 +39,7 @@ * * $Id: vinumrequest.c,v 1.30 2001/01/09 04:20:55 grog Exp grog $ * $FreeBSD: src/sys/dev/vinum/vinumrequest.c,v 1.44.2.5 2002/08/28 04:30:56 grog Exp $ - * $DragonFly: src/sys/dev/raid/vinum/vinumrequest.c,v 1.20 2007/07/31 18:13:01 dillon Exp $ + * $DragonFly: src/sys/dev/raid/vinum/vinumrequest.c,v 1.21 2007/09/15 20:06:39 swildner Exp $ */ #include "vinumhdr.h" @@ -631,11 +631,11 @@ bre(struct request *rq, #if VINUMDEBUG if (debug & DEBUG_EOFINFO) { /* tell on the request */ log(LOG_DEBUG, - "vinum: EOF on plex %s, sd %s offset %llx (user offset %x)\n", + "vinum: EOF on plex %s, sd %s offset %jx (user offset %jx)\n", plex->name, sd->name, - (u_int) sd->sectors, - bp->b_bio1.bio_offset); + (uintmax_t)sd->sectors, + (uintmax_t)bp->b_bio1.bio_offset); log(LOG_DEBUG, "vinum: stripebase %x, stripeoffset %x, blockoffset %x\n", stripebase, -- 2.41.0