Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Feb 2017 18:14:33 +0000 (UTC)
From:      Mariusz Zaborski <oshogbo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r314275 - in head/sys/boot/i386: boot2 common
Message-ID:  <201702251814.v1PIEX1R071707@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: oshogbo
Date: Sat Feb 25 18:14:32 2017
New Revision: 314275
URL: https://svnweb.freebsd.org/changeset/base/314275

Log:
  Remove unused macro from common/drv.c.
  
  When we was compering it to code from boot2 it also looks like
  this code is buggy and boot2 was never updated to use this code.
  USE_XREAD flag is unused in boot2, and common/drv.c was never
  build with that flag.
  
  Reviewed by:	jhb
  Differential Revision:	https://reviews.freebsd.org/D9780

Modified:
  head/sys/boot/i386/boot2/Makefile
  head/sys/boot/i386/common/drv.c

Modified: head/sys/boot/i386/boot2/Makefile
==============================================================================
--- head/sys/boot/i386/boot2/Makefile	Sat Feb 25 17:03:48 2017	(r314274)
+++ head/sys/boot/i386/boot2/Makefile	Sat Feb 25 18:14:32 2017	(r314275)
@@ -25,7 +25,6 @@ BOOT2_UFS?=	UFS1_AND_UFS2
 CFLAGS=	-fomit-frame-pointer \
 	-mrtd \
 	-mregparm=3 \
-	-DUSE_XREAD \
 	-D${BOOT2_UFS} \
 	-DFLAGS=${BOOT_BOOT1_FLAGS} \
 	-DSIOPRT=${BOOT_COMCONSOLE_PORT} \

Modified: head/sys/boot/i386/common/drv.c
==============================================================================
--- head/sys/boot/i386/common/drv.c	Sat Feb 25 17:03:48 2017	(r314274)
+++ head/sys/boot/i386/common/drv.c	Sat Feb 25 18:14:32 2017	(r314275)
@@ -25,9 +25,6 @@ __FBSDID("$FreeBSD$");
 #include "util.h"
 #include "drv.h"
 #include "edd.h"
-#ifdef USE_XREAD
-#include "xreadorg.h"
-#endif
 
 static struct edd_params params;
 
@@ -50,9 +47,7 @@ drvsize(struct dsk *dskp)
 	return (params.sectors);
 }
 
-#ifndef USE_XREAD
 static struct edd_packet packet;
-#endif
 
 int
 drvread(struct dsk *dskp, void *buf, daddr_t lba, unsigned nblk)
@@ -61,7 +56,6 @@ drvread(struct dsk *dskp, void *buf, dad
 
 	if (!OPT_CHECK(RBX_QUIET))
 		printf("%c\b", c = c << 8 | c >> 24);
-#ifndef USE_XREAD
 	packet.len = sizeof(struct edd_packet);
 	packet.count = nblk;
 	packet.off = VTOPOFF(buf);
@@ -73,15 +67,6 @@ drvread(struct dsk *dskp, void *buf, dad
 	v86.edx = dskp->drive;
 	v86.ds = VTOPSEG(&packet);
 	v86.esi = VTOPOFF(&packet);
-#else	/* USE_XREAD */
-	v86.ctl = V86_ADDR | V86_CALLF | V86_FLAGS;
-	v86.addr = XREADORG;		/* call to xread in boot1 */
-	v86.es = VTOPSEG(buf);
-	v86.eax = lba;
-	v86.ebx = VTOPOFF(buf);
-	v86.ecx = lba >> 32;
-	v86.edx = nblk << 8 | dskp->drive;
-#endif	/* USE_XREAD */
 	v86int();
 	if (V86_CY(v86.efl)) {
 		printf("%s: error %u lba %u\n",



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