diff options
| author | sborrill <sborrill@NetBSD.org> | 2009-04-03 16:23:41 +0000 |
|---|---|---|
| committer | sborrill <sborrill@NetBSD.org> | 2009-04-03 16:23:41 +0000 |
| commit | 5547ed17344e0a665d03d6f1e180cccec09d6e37 (patch) | |
| tree | d37dbaf1067bee6ee4bee13dd07e43451b4e1973 /sys/dev/raidframe | |
| parent | 35ecaecfb02fc116567afbdab4b3cd57638641dc (diff) | |
Switch various printfs from %ld and %d to PRIu64, etc. to be more consistent
about types (for instance uint32_t was being printed with %d).
Diffstat (limited to 'sys/dev/raidframe')
| -rw-r--r-- | sys/dev/raidframe/rf_disks.c | 37 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_netbsdkintf.c | 14 |
2 files changed, 26 insertions, 25 deletions
diff --git a/sys/dev/raidframe/rf_disks.c b/sys/dev/raidframe/rf_disks.c index 0a4d69b76b5..bf22bd12356 100644 --- a/sys/dev/raidframe/rf_disks.c +++ b/sys/dev/raidframe/rf_disks.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_disks.c,v 1.70 2008/04/28 20:23:56 martin Exp $ */ +/* $NetBSD: rf_disks.c,v 1.71 2009/04/03 16:23:41 sborrill Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. @@ -60,7 +60,7 @@ ***************************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_disks.c,v 1.70 2008/04/28 20:23:56 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_disks.c,v 1.71 2009/04/03 16:23:41 sborrill Exp $"); #include <dev/raidframe/raidframevar.h> @@ -143,9 +143,9 @@ rf_ConfigureDisks(RF_ShutdownList_t **listp, RF_Raid_t *raidPtr, } else { if (disks[c].numBlocks < min_numblks) min_numblks = disks[c].numBlocks; - DPRINTF6("Disk at col %d: dev %s numBlocks %ld blockSize %d (%ld MB)\n", + DPRINTF6("Disk at col %d: dev %s numBlocks %" PRIu64 " blockSize %d (%ld MB)\n", c, disks[c].devname, - (long int) disks[c].numBlocks, + disks[c].numBlocks, disks[c].blockSize, (long int) disks[c].numBlocks * disks[c].blockSize / 1024 / 1024); @@ -253,9 +253,9 @@ rf_ConfigureSpareDisks(RF_ShutdownList_t **listp, RF_Raid_t *raidPtr, } else { disks[i].status = rf_ds_spare; /* change status to * spare */ - DPRINTF6("Spare Disk %d: dev %s numBlocks %ld blockSize %d (%ld MB)\n", i, + DPRINTF6("Spare Disk %d: dev %s numBlocks %" PRIu64 " blockSize %d (%ld MB)\n", i, disks[i].devname, - (long int) disks[i].numBlocks, disks[i].blockSize, + disks[i].numBlocks, disks[i].blockSize, (long int) disks[i].numBlocks * disks[i].blockSize / 1024 / 1024); } @@ -271,17 +271,17 @@ rf_ConfigureSpareDisks(RF_ShutdownList_t **listp, RF_Raid_t *raidPtr, goto fail; } if (disks[i].numBlocks < raidPtr->sectorsPerDisk) { - RF_ERRORMSG3("Spare disk %s (%d blocks) is too small to serve as a spare (need %ld blocks)\n", + RF_ERRORMSG3("Spare disk %s (%d blocks) is too small to serve as a spare (need %" PRIu64 " blocks)\n", disks[i].devname, disks[i].blockSize, - (long int) raidPtr->sectorsPerDisk); + raidPtr->sectorsPerDisk); ret = EINVAL; goto fail; } else if (disks[i].numBlocks > raidPtr->sectorsPerDisk) { - RF_ERRORMSG3("Warning: truncating spare disk %s to %ld blocks (from %ld)\n", + RF_ERRORMSG3("Warning: truncating spare disk %s to %" PRIu64 " blocks (from %" PRIu64 ")\n", disks[i].devname, - (long int) raidPtr->sectorsPerDisk, - (long int) disks[i].numBlocks); + raidPtr->sectorsPerDisk, + disks[i].numBlocks); disks[i].numBlocks = raidPtr->sectorsPerDisk; } @@ -980,9 +980,10 @@ rf_add_hot_spare(RF_Raid_t *raidPtr, RF_SingleComponent_t *sparePtr) goto fail; } else { disks[spare_number].status = rf_ds_spare; - DPRINTF6("Spare Disk %d: dev %s numBlocks %ld blockSize %d (%ld MB)\n", spare_number, + DPRINTF6("Spare Disk %d: dev %s numBlocks %" PRIu64 " blockSize %d (%ld MB)\n", + spare_number, disks[spare_number].devname, - (long int) disks[spare_number].numBlocks, + disks[spare_number].numBlocks, disks[spare_number].blockSize, (long int) disks[spare_number].numBlocks * disks[spare_number].blockSize / 1024 / 1024); @@ -998,20 +999,20 @@ rf_add_hot_spare(RF_Raid_t *raidPtr, RF_SingleComponent_t *sparePtr) goto fail; } if (disks[spare_number].numBlocks < raidPtr->sectorsPerDisk) { - RF_ERRORMSG3("Spare disk %s (%d blocks) is too small to serve as a spare (need %ld blocks)\n", + RF_ERRORMSG3("Spare disk %s (%d blocks) is too small to serve as a spare (need %" PRIu64 " blocks)\n", disks[spare_number].devname, disks[spare_number].blockSize, - (long int) raidPtr->sectorsPerDisk); + raidPtr->sectorsPerDisk); rf_close_component(raidPtr, raidPtr->raid_cinfo[raidPtr->numCol+spare_number].ci_vp, 0); ret = EINVAL; goto fail; } else { if (disks[spare_number].numBlocks > raidPtr->sectorsPerDisk) { - RF_ERRORMSG3("Warning: truncating spare disk %s to %ld blocks (from %ld)\n", + RF_ERRORMSG3("Warning: truncating spare disk %s to %" PRIu64 " blocks (from %" PRIu64 ")\n", disks[spare_number].devname, - (long int) raidPtr->sectorsPerDisk, - (long int) disks[spare_number].numBlocks); + raidPtr->sectorsPerDisk, + disks[spare_number].numBlocks); disks[spare_number].numBlocks = raidPtr->sectorsPerDisk; } diff --git a/sys/dev/raidframe/rf_netbsdkintf.c b/sys/dev/raidframe/rf_netbsdkintf.c index 5f058e6b966..2a76a2b351f 100644 --- a/sys/dev/raidframe/rf_netbsdkintf.c +++ b/sys/dev/raidframe/rf_netbsdkintf.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.259 2009/03/15 17:17:23 cegger Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.260 2009/04/03 16:23:41 sborrill Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc. * All rights reserved. @@ -139,7 +139,7 @@ ***********************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.259 2009/03/15 17:17:23 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.260 2009/04/03 16:23:41 sborrill Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -2308,15 +2308,15 @@ raidgetdisklabel(dev_t dev) */ if (lp->d_secperunit != rs->sc_size) printf("raid%d: WARNING: %s: " - "total sector size in disklabel (%d) != " - "the size of raid (%ld)\n", unit, rs->sc_xname, - lp->d_secperunit, (long) rs->sc_size); + "total sector size in disklabel (%" PRIu32 ") != " + "the size of raid (%" PRIu64 ")\n", unit, rs->sc_xname, + lp->d_secperunit, rs->sc_size); for (i = 0; i < lp->d_npartitions; i++) { pp = &lp->d_partitions[i]; if (pp->p_offset + pp->p_size > rs->sc_size) printf("raid%d: WARNING: %s: end of partition `%c' " - "exceeds the size of raid (%ld)\n", - unit, rs->sc_xname, 'a' + i, (long) rs->sc_size); + "exceeds the size of raid (%" PRIu64 ")\n", + unit, rs->sc_xname, 'a' + i, rs->sc_size); } } |
