From owner-svn-src-head@freebsd.org Wed Aug 15 22:28:59 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 D8E641072A2E for ; Wed, 15 Aug 2018 22:28:58 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 52B537F8CC for ; Wed, 15 Aug 2018 22:28:58 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: 97df9aa3-a0da-11e8-93fa-f3ebd9db2b94 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound1.ore.mailhop.org (Halon) with ESMTPSA id 97df9aa3-a0da-11e8-93fa-f3ebd9db2b94; Wed, 15 Aug 2018 22:28:55 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w7FMSsrL076132; Wed, 15 Aug 2018 16:28:54 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1534372134.1466.21.camel@freebsd.org> Subject: Re: svn commit: r337878 - head/stand/i386/libi386 From: Ian Lepore To: Toomas Soome , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Wed, 15 Aug 2018 16:28:54 -0600 In-Reply-To: <201808152225.w7FMP5J2018006@repo.freebsd.org> References: <201808152225.w7FMP5J2018006@repo.freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 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:28:59 -0000 On Wed, 2018-08-15 at 22:25 +0000, Toomas Soome wrote: > 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)); >  } >   >  /* > This would be a more satisfying change if there were something like  #define BD_RD 0  #define BD_WR 1 so that it was clear at a glance what a bd_io() call is doing. -- Ian