summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2015-11-29 15:35:42 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2015-11-29 15:35:42 +0000
commitc6995be47319b21ea1427249e290aada015e6d7e (patch)
tree9c039aabfa008cb39f8b96e04d165c64ceb8186b /sys
parentee0639bec2ade1c52be2381c4e30c6023f03cf99 (diff)
Disk size in blocks is LastBlock+1. Fix whitespace nit.
ok yasuoka@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/amd64/stand/efiboot/efidev.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/arch/amd64/stand/efiboot/efidev.c b/sys/arch/amd64/stand/efiboot/efidev.c
index 034bb4f21a3..85e69eff7a6 100644
--- a/sys/arch/amd64/stand/efiboot/efidev.c
+++ b/sys/arch/amd64/stand/efiboot/efidev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: efidev.c,v 1.10 2015/11/28 22:53:38 krw Exp $ */
+/* $OpenBSD: efidev.c,v 1.11 2015/11/29 15:35:41 krw Exp $ */
/*
* Copyright (c) 1996 Michael Shalayeff
@@ -668,7 +668,8 @@ efi_dump_diskinfo(void)
bdi = &dip->bios_info;
ed = dip->efi_info;
- siz = ed->blkio->Media->LastBlock * ed->blkio->Media->BlockSize;
+ siz = (ed->blkio->Media->LastBlock + 1) *
+ ed->blkio->Media->BlockSize;
siz /= 1024 * 1024;
if (siz < 10000)
sizu = "MB";
@@ -676,7 +677,7 @@ efi_dump_diskinfo(void)
siz /= 1024;
sizu = "GB";
}
-
+
printf("hd%d\t%u\t%u\t%u%s\t0x%x\t0x%x\t%s\n",
(bdi->bios_number & 0x7f),
ed->blkio->Media->BlockSize,