From b15e543bf5eada0d608ecb34c0346cd58d7742b4 Mon Sep 17 00:00:00 2001 From: jhb Date: Wed, 9 Dec 2009 21:09:32 +0000 Subject: Fix a confusing typo in the EDD packet structure used in gptboot and gptzfsboot. I got the segment and offset fields reversed in the structure, but I also succeeded in crossing the assignments so the actual EDD packet ended up correct. MFC after: 1 week --- sys/boot/i386/gptboot/gptboot.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/boot/i386/gptboot/gptboot.c') diff --git a/sys/boot/i386/gptboot/gptboot.c b/sys/boot/i386/gptboot/gptboot.c index 89df2ec..96efea6 100644 --- a/sys/boot/i386/gptboot/gptboot.c +++ b/sys/boot/i386/gptboot/gptboot.c @@ -642,8 +642,8 @@ bcmp(const void *b1, const void *b2, size_t length) static struct { uint16_t len; uint16_t count; - uint16_t seg; uint16_t off; + uint16_t seg; uint64_t lba; } packet; @@ -656,8 +656,8 @@ drvread(void *buf, daddr_t lba, unsigned nblk) printf("%c\b", c = c << 8 | c >> 24); packet.len = 0x10; packet.count = nblk; - packet.seg = VTOPOFF(buf); - packet.off = VTOPSEG(buf); + packet.off = VTOPOFF(buf); + packet.seg = VTOPSEG(buf); packet.lba = lba; v86.ctl = V86_FLAGS; v86.addr = 0x13; -- cgit v1.1