diff options
author | YASUOKA Masahiko <yasuoka@cvs.openbsd.org> | 2016-12-24 08:41:14 +0000 |
---|---|---|
committer | YASUOKA Masahiko <yasuoka@cvs.openbsd.org> | 2016-12-24 08:41:14 +0000 |
commit | d88cc81bd2e0c007eaf6bd7c04639a09d3f7854c (patch) | |
tree | 14902667d7ed86dc8d88c47d6da5d16d750f2ca8 /sys | |
parent | 591c13b9b2f8ef76aa5d30fb4cd9868fab8fb838 (diff) |
The unit of the parition offset in disklabel is number of sectors in the
sector size, not in 512 byte blocks. tested by gonzalo.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/amd64/stand/efiboot/efidev.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/arch/amd64/stand/efiboot/efidev.c b/sys/arch/amd64/stand/efiboot/efidev.c index 5cc41112a9a..41a92cdae90 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.23 2016/12/23 07:35:01 yasuoka Exp $ */ +/* $OpenBSD: efidev.c,v 1.24 2016/12/24 08:41:13 yasuoka Exp $ */ /* * Copyright (c) 1996 Michael Shalayeff @@ -726,7 +726,8 @@ efistrategy(void *devdata, int rw, daddr32_t blk, size_t size, void *buf, return sr_strategy(dip->sr_vol, rw, blk, size, buf, rsize); #endif nsect = (size + DEV_BSIZE - 1) / DEV_BSIZE; - blk += dip->disklabel.d_partitions[B_PARTITION(dip->bsddev)].p_offset; + blk += DL_SECTOBLK(&dip->disklabel, + dip->disklabel.d_partitions[B_PARTITION(dip->bsddev)].p_offset); if (blk < 0) error = EINVAL; |