From owner-svn-src-all@FreeBSD.ORG Fri Jun 17 19:40:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id C4E081065677; Fri, 17 Jun 2011 19:40:16 +0000 (UTC) Date: Fri, 17 Jun 2011 19:40:16 +0000 From: Alexander Best To: Joerg Wunsch Message-ID: <20110617194016.GA67349@freebsd.org> References: <201106171856.p5HIuplN002929@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201106171856.p5HIuplN002929@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r223197 - head/usr.sbin/fdread X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jun 2011 19:40:16 -0000 On Fri Jun 17 11, Joerg Wunsch wrote: > Author: joerg > Date: Fri Jun 17 18:56:51 2011 > New Revision: 223197 > URL: http://svn.freebsd.org/changeset/base/223197 any thoughts about switching the default from WITH_FLOPPY to WITHOUT_FLOPPY? i don't think too many people are using floppy disks nowadays. cheers. alex > > Log: > Open the floppy disk device with O_RDONLY rather than O_RDWR. After > all, this is the fd*read* command, and thus should be able to read > even write-protected disks. > > MFC after: 1 week > > Modified: > head/usr.sbin/fdread/fdread.c > > Modified: head/usr.sbin/fdread/fdread.c > ============================================================================== > --- head/usr.sbin/fdread/fdread.c Fri Jun 17 18:49:59 2011 (r223196) > +++ head/usr.sbin/fdread/fdread.c Fri Jun 17 18:56:51 2011 (r223197) > @@ -149,7 +149,7 @@ main(int argc, char **argv) > err(EX_OSERR, "cannot create output file %s", fname); > } > > - if ((fd = open(_devname, O_RDWR)) == -1) > + if ((fd = open(_devname, O_RDONLY)) == -1) > err(EX_OSERR, "cannot open device %s", _devname); > > return (numids? doreadid(fd, numids, trackno): doread(fd, of, _devname)); -- a13x