svn commit: r314275 - in head/sys/boot/i386: boot2 common
Mariusz Zaborski
oshogbo at FreeBSD.org
Sat Feb 25 18:14:34 UTC 2017
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",
More information about the svn-src-head
mailing list