Fix display of total number of sectors if > 2^32 on 32-bit machines
This commit is contained in:
parent
6dadfb80d4
commit
244791d8a2
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: rf_driver.c,v 1.116 2008/02/12 03:12:41 oster Exp $ */
|
||||
/* $NetBSD: rf_driver.c,v 1.117 2008/04/14 14:53:52 sborrill Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
|
@ -73,7 +73,7 @@
|
|||
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: rf_driver.c,v 1.116 2008/02/12 03:12:41 oster Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: rf_driver.c,v 1.117 2008/04/14 14:53:52 sborrill Exp $");
|
||||
|
||||
#include "opt_raid_diagnostic.h"
|
||||
|
||||
|
@ -425,10 +425,10 @@ rf_Configure(RF_Raid_t *raidPtr, RF_Config_t *cfgPtr, RF_AutoConfig_t *ac)
|
|||
}
|
||||
}
|
||||
printf("\n");
|
||||
printf("raid%d: Total Sectors: %lu (%lu MB)\n",
|
||||
printf("raid%d: Total Sectors: %" PRIu64 " (%" PRIu64 " MB)\n",
|
||||
raidPtr->raidid,
|
||||
(unsigned long) raidPtr->totalSectors,
|
||||
(unsigned long) (raidPtr->totalSectors / 1024 *
|
||||
raidPtr->totalSectors,
|
||||
(raidPtr->totalSectors / 1024 *
|
||||
(1 << raidPtr->logBytesPerSector) / 1024));
|
||||
|
||||
return (0);
|
||||
|
|
Loading…
Reference in New Issue