summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2013-10-07 22:11:50 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2013-10-07 22:11:50 +0000
commit7515cee01106f8dd57fe9ffda32576faa322790f (patch)
tree0de9fdb05f59936d99035250cfdff116f51131dd /sys/kern
parent13c7f051e2508b48e294c856399827db2a980a04 (diff)
disk sizes, partition sizes and partition offsets are u_int64_t
values rather than daddr_t values. So use u_int64_t to store them and %llu to print them in checkdisklabel().
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/subr_disk.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c
index f936e378eda..1ce7e676e59 100644
--- a/sys/kern/subr_disk.c
+++ b/sys/kern/subr_disk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_disk.c,v 1.152 2013/09/03 17:48:26 krw Exp $ */
+/* $OpenBSD: subr_disk.c,v 1.153 2013/10/07 22:11:49 krw Exp $ */
/* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */
/*
@@ -238,7 +238,7 @@ checkdisklabel(void *rlp, struct disklabel *lp, u_int64_t boundstart,
struct disklabel *dlp = rlp;
struct __partitionv0 *v0pp;
struct partition *pp;
- daddr_t disksize;
+ u_int64_t disksize;
int error = 0;
int i;
@@ -354,13 +354,13 @@ checkdisklabel(void *rlp, struct disklabel *lp, u_int64_t boundstart,
#ifdef DEBUG
if (DL_GETDSIZE(lp) != disksize)
- printf("on-disk disklabel has incorrect disksize (%lld)\n",
+ printf("on-disk disklabel has incorrect disksize (%llu)\n",
DL_GETDSIZE(lp));
if (DL_GETPSIZE(&lp->d_partitions[RAW_PART]) != disksize)
- printf("on-disk disklabel RAW_PART has incorrect size (%lld)\n",
+ printf("on-disk disklabel RAW_PART has incorrect size (%llu)\n",
DL_GETPSIZE(&lp->d_partitions[RAW_PART]));
if (DL_GETPOFFSET(&lp->d_partitions[RAW_PART]) != 0)
- printf("on-disk disklabel RAW_PART offset != 0 (%lld)\n",
+ printf("on-disk disklabel RAW_PART offset != 0 (%llu)\n",
DL_GETPOFFSET(&lp->d_partitions[RAW_PART]));
#endif
DL_SETDSIZE(lp, disksize);