Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Dec 2009 21:21:14 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r200692 - in stable/8/sys/boot/i386: gptboot zfsboot
Message-ID:  <200912182121.nBILLE3r009105@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Fri Dec 18 21:21:14 2009
New Revision: 200692
URL: http://svn.freebsd.org/changeset/base/200692

Log:
  MFC 200310:
  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.

Modified:
  stable/8/sys/boot/i386/gptboot/gptboot.c
  stable/8/sys/boot/i386/zfsboot/zfsboot.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/boot/i386/gptboot/gptboot.c
==============================================================================
--- stable/8/sys/boot/i386/gptboot/gptboot.c	Fri Dec 18 21:12:37 2009	(r200691)
+++ stable/8/sys/boot/i386/gptboot/gptboot.c	Fri Dec 18 21:21:14 2009	(r200692)
@@ -642,8 +642,8 @@ bcmp(const void *b1, const void *b2, siz
 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
 	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;

Modified: stable/8/sys/boot/i386/zfsboot/zfsboot.c
==============================================================================
--- stable/8/sys/boot/i386/zfsboot/zfsboot.c	Fri Dec 18 21:12:37 2009	(r200691)
+++ stable/8/sys/boot/i386/zfsboot/zfsboot.c	Fri Dec 18 21:21:14 2009	(r200692)
@@ -1049,8 +1049,8 @@ putchar(int c)
 static struct {
 	uint16_t len;
 	uint16_t count;
-	uint16_t seg;
 	uint16_t off;
+	uint16_t seg;
 	uint64_t lba;
 } packet;
 #endif
@@ -1065,8 +1065,8 @@ drvread(struct dsk *dsk, void *buf, dadd
 	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 + dsk->start;
     v86.ctl = V86_FLAGS;
     v86.addr = 0x13;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912182121.nBILLE3r009105>