Module Name:    src
Committed By:   tsutsui
Date:           Sat Sep 12 18:46:43 UTC 2009

Modified Files:
        src/sys/dev/gpib: rd.c

Log Message:
- fix warnings of printf(9) format and void pointer arithmetic
- use DTYPE_HPIB for now instead of nonexistent DTYPE_GPIB


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/gpib/rd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/gpib/rd.c
diff -u src/sys/dev/gpib/rd.c:1.26 src/sys/dev/gpib/rd.c:1.27
--- src/sys/dev/gpib/rd.c:1.26	Tue May 12 14:21:58 2009
+++ src/sys/dev/gpib/rd.c	Sat Sep 12 18:46:42 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: rd.c,v 1.26 2009/05/12 14:21:58 cegger Exp $ */
+/*	$NetBSD: rd.c,v 1.27 2009/09/12 18:46:42 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 1996-2003 The NetBSD Foundation, Inc.
@@ -111,7 +111,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.26 2009/05/12 14:21:58 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.27 2009/09/12 18:46:42 tsutsui Exp $");
 
 #include "rnd.h"
 
@@ -597,7 +597,7 @@
 	sc = device_lookup_private(&rd_cd, RDUNIT(bp->b_dev));
 
 	DPRINTF(RDB_FOLLOW,
-	    ("rdstrategy(%p): dev %x, bn %" PRId64 ", bcount %ld, %c\n",
+	    ("rdstrategy(%p): dev %" PRIx64 ", bn %" PRId64 ", bcount %d, %c\n",
 	    bp, bp->b_dev, bp->b_blkno, bp->b_bcount,
 	    (bp->b_flags & B_READ) ? 'R' : 'W'));
 
@@ -1060,7 +1060,7 @@
 
 	memset((void *)lp, 0, sizeof(struct disklabel));
 
-	lp->d_type = DTYPE_GPIB;
+	lp->d_type = DTYPE_HPIB /* DTYPE_GPIB */;
 	lp->d_secsize = DEV_BSIZE;
 	lp->d_nsectors = rdidentinfo[type].ri_nbpt;
 	lp->d_ntracks = rdidentinfo[type].ri_ntpc;
@@ -1202,7 +1202,7 @@
 		/* update block count */
 		totwrt -= nwrt;
 		blkno += nwrt;
-		va += sectorsize * nwrt;
+		va = (char *)va + sectorsize * nwrt;
 	}
 	rddoingadump = 0;
 	return (0);

Reply via email to