From owner-svn-src-head@freebsd.org Wed Aug 15 22:25:06 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00032107297A; Wed, 15 Aug 2018 22:25:05 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AADE57F719; Wed, 15 Aug 2018 22:25:05 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8BEF610AFA; Wed, 15 Aug 2018 22:25:05 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7FMP5bj018007; Wed, 15 Aug 2018 22:25:05 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7FMP5J2018006; Wed, 15 Aug 2018 22:25:05 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201808152225.w7FMP5J2018006@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Wed, 15 Aug 2018 22:25:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r337878 - head/stand/i386/libi386 X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/stand/i386/libi386 X-SVN-Commit-Revision: 337878 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 22:25:06 -0000 Author: tsoome Date: Wed Aug 15 22:25:05 2018 New Revision: 337878 URL: https://svnweb.freebsd.org/changeset/base/337878 Log: libi386: remove bd_read() and bd_write() wrappers Those wroappers are nice, but do not really add much value. Modified: head/stand/i386/libi386/biosdisk.c Modified: head/stand/i386/libi386/biosdisk.c ============================================================================== --- head/stand/i386/libi386/biosdisk.c Wed Aug 15 21:47:03 2018 (r337877) +++ head/stand/i386/libi386/biosdisk.c Wed Aug 15 22:25:05 2018 (r337878) @@ -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, s 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, s 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); } @@ -713,20 +710,6 @@ bd_io(struct disk_devdesc *dev, daddr_t dblk, int blks } 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)); } /*