Subject: port-mac68k/20188: daddr_t extension missed a few format strings
To: None <gnats-bugs@gnats.netbsd.org>
From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
List: netbsd-bugs
Date: 02/03/2003 22:39:15
>Number:         20188
>Category:       port-mac68k
>Synopsis:       daddr_t extension missed a few format strings
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    port-mac68k-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 03 13:42:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
>Release:        -current of 2003-02-01
>Organization:
Einzeln auftretender Radfahrer
>Environment:
System: NetBSD q700 1.6K NetBSD 1.6K (FG54) #12: Fri Dec 20 10:17:57 CET 2002 hauke@q700:/usr/src/sys/arch/mac68k/compile/FG54 mac68k
Architecture: m68k
Machine: mac68k

>Description:
	A -current kernel build breaks because of warnings: When
	daddr_t was extended from 32 bits to 64 bits, a few printf
	format strings went unnoticed.

>How-To-Repeat:
	Build a mac68k kernel from -current sources.
 
>Fix:
	Apply the following patch:

--- /.source/sys/arch/mac68k/obio/iwm_fd.c	Mon Jan  6 23:31:19 2003
+++ mac68k/obio/iwm_fd.c	Mon Feb  3 22:27:28 2003
@@ -1045,7 +1045,7 @@
 		    || (bp->b_bcount % sectSize) != 0) {
 			if (TRACE_STRAT)
 				printf(" Illegal transfer size: "
-				    "block %d, %ld bytes\n",
+				    "block %qd, %ld bytes\n",
 				    bp->b_blkno, bp->b_bcount);
 			err = EINVAL;
 		}
@@ -1064,7 +1064,7 @@
 		if (bp->b_blkno + transferSize > fd->currentType->secPerDisk) {
 			if (TRACE_STRAT) {
 				printf("iwm: Transfer beyond end of disk!\n" \
-				    " (Starting block %d, # of blocks %d," \
+				    " (Starting block %qd, # of blocks %d," \
 				    " last disk block %d).\n",
 				    bp->b_blkno, transferSize,
 				    fd->currentType->secPerDisk);
@@ -1096,7 +1096,7 @@
 		bp->b_cylinder = physDiskLoc.track;
 
 		if (TRACE_STRAT) {
-			printf(" This job starts at b_blkno %d; ",
+			printf(" This job starts at b_blkno %qd; ",
 			    bp->b_blkno);
 			printf("it gets sorted for cylinder # %ld.\n",
 			    bp->b_cylinder);
@@ -1256,7 +1256,7 @@
 
 	/* Calculate the side/track/sector our block is at. */
 	if (TRACE_STRAT)
-		printf(" Remap block %d ", fd->startBlk);
+		printf(" Remap block %qd ", fd->startBlk);
 	remap_geometry(fd->startBlk,
 	    fd->currentType->heads, &fd->pos);
 	if (TRACE_STRAT)

>Release-Note:
>Audit-Trail:
>Unformatted: