aboutsummaryrefslogtreecommitdiff
path: root/stand
diff options
context:
space:
mode:
authorToomas Soome <tsoome@FreeBSD.org>2018-08-15 22:25:05 +0000
committerToomas Soome <tsoome@FreeBSD.org>2018-08-15 22:25:05 +0000
commit462d81dd3f938972d325eba16e7d20ae7713f470 (patch)
treeb8fb347597310b6012f0d9fce25eb8435caa1625 /stand
parent8c000099ecb0f28a44f348a0f2a0f5ebd0790cf3 (diff)
downloadsrc-462d81dd3f938972d325eba16e7d20ae7713f470.tar.gz
src-462d81dd3f938972d325eba16e7d20ae7713f470.zip
libi386: remove bd_read() and bd_write() wrappers
Those wroappers are nice, but do not really add much value.
Notes
Notes: svn path=/head/; revision=337878
Diffstat (limited to 'stand')
-rw-r--r--stand/i386/libi386/biosdisk.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/stand/i386/libi386/biosdisk.c b/stand/i386/libi386/biosdisk.c
index 34da34c2bea3..aaf76955456d 100644
--- a/stand/i386/libi386/biosdisk.c
+++ b/stand/i386/libi386/biosdisk.c
@@ -94,10 +94,7 @@ static int nbdinfo = 0;
static void bd_io_workaround(struct disk_devdesc *dev);
-static int bd_read(struct disk_devdesc *dev, daddr_t dblk, int blks,
- caddr_t dest);
-static int bd_write(struct disk_devdesc *dev, daddr_t dblk, int blks,
- caddr_t dest);
+static int bd_io(struct disk_devdesc *, daddr_t, int, caddr_t, int);
static int bd_int13probe(struct bdinfo *bd);
static int bd_init(void);
@@ -506,7 +503,7 @@ bd_realstrategy(void *devdata, int rw, daddr_t dblk, size_t size,
case F_READ:
DEBUG("read %d from %lld to %p", blks, dblk, buf);
- if (blks && (rc = bd_read(dev, dblk, blks, buf))) {
+ if (blks && (rc = bd_io(dev, dblk, blks, buf, 0))) {
/* Filter out floppy controller errors */
if (BD(dev).bd_flags != BD_FLOPPY || rc != 0x20) {
printf("read %d from %lld to %p, error: 0x%x\n",
@@ -518,7 +515,7 @@ bd_realstrategy(void *devdata, int rw, daddr_t dblk, size_t size,
case F_WRITE :
DEBUG("write %d from %lld to %p", blks, dblk, buf);
- if (blks && bd_write(dev, dblk, blks, buf)) {
+ if (blks && bd_io(dev, dblk, blks, buf, 1)) {
DEBUG("write error");
return (EIO);
}
@@ -715,20 +712,6 @@ bd_io(struct disk_devdesc *dev, daddr_t dblk, int blks, caddr_t dest,
return (0);
}
-static int
-bd_read(struct disk_devdesc *dev, daddr_t dblk, int blks, caddr_t dest)
-{
-
- return (bd_io(dev, dblk, blks, dest, 0));
-}
-
-static int
-bd_write(struct disk_devdesc *dev, daddr_t dblk, int blks, caddr_t dest)
-{
-
- return (bd_io(dev, dblk, blks, dest, 1));
-}
-
/*
* Return the BIOS geometry of a given "fixed drive" in a format
* suitable for the legacy bootinfo structure. Since the kernel is