Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!howland.erols.net!news.mathworks.com!fu-berlin.de!irz401!orion.sax.de!uriah.heep!news From: j@uriah.heep.sax.de (J Wunsch) Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: tar cMvf /dev/fd0 Date: 22 Oct 1996 23:23:31 GMT Organization: Private BSD site, Dresden Lines: 49 Message-ID: <54jl1j$k3o@uriah.heep.sax.de> References: <2h7mooa0i3.fsf@dslab7.cs.uit.no> <54989v$c8@uriah.heep.sax.de> <slrn56ks4p.3d7.hdm@dishmop.noc.demon.net> Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) NNTP-Posting-Host: localhost.heep.sax.de Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Newsreader: knews 0.9.6 X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E hdm@demon.net (Dominic Mitchell) wrote: > | Probably because there's a bug in the fd driver... > | > | Try -L1440, or better yet, fix the bug and send me the fix. <:) > > Hmmm... I experienced this bug under NetBSD, too. Probably means that > it's a gnu tar bug, or it's a piece of code which has remained common > for some time! Inherited bugs from the 386BSD floppy disk driver. I think the error is inside fdstrategy() about here: /* * Set up block calculations. */ blknum = (unsigned long) bp->b_blkno * DEV_BSIZE/fdblk; nblocks = fd->ft->size; if (blknum + (bp->b_bcount / fdblk) > nblocks) { if (blknum == nblocks) { bp->b_resid = bp->b_bcount; } else { bp->b_error = ENOSPC; bp->b_flags |= B_ERROR; } goto bad; } The ENOSPC itself is already bogus, but i seem to remember that Bruce Evans once pointed out to me that the entire error is wrong. I think it should return EINVAL for an attempt to start a transfer beyond the limit of the disk, but should return a short read (or write) of length 0 but no error if the fence has just been hit only. > If you want more details, mail me and I will try to help. The only more detail i need is a bugfix. :-) I can reproduce the bug fine if i want... so no, i don't need any more data _on this_. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)