*BSD News Article 36442


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!uwm.edu!math.ohio-state.edu!jussieu.fr!univ-lyon1.fr!swidir.switch.ch!newsfeed.ACO.net!Austria.EU.net!EU.net!uunet!zib-berlin.de!irz401!uriah!not-for-mail
From: j@uriah.sax.de (J Wunsch)
Newsgroups: comp.os.386bsd.bugs
Subject: Re: Floppy disks in FreeBSD 1.1.5.1
Date: 1 Oct 1994 19:55:58 +0100
Organization: Private U**X site; member IN e.V.
Lines: 48
Message-ID: <36kbbuINNhj6@bonnie.sax.de>
References: <CwrHEK.E6B@cogsci.ed.ac.uk>
NNTP-Posting-Host: bonnie.sax.de

richard@cogsci.ed.ac.uk (Richard Tobin) writes:

>(1) There is no man page for the floppy disk driver.  There is however
>    an entry for fd in section 4, which describes the file descriptor
>    devices, even though the fdformat(1) man page refers to fd(4) meaning
>    the floppy disk.  

Well, i was aware of the fact that fd(4) didn't yet exist. Anyway,
i decided to xref the appropriate device driver man page - just in
case there will be one some day.

FreeBSD 2.0 will have device driver man pages for far more drivers.
(Sorry, i forgot the name of the guy who did this work and contributed
them.) It's named fdc(4) there, so i will have to correct the xref in
fdformat(1).

>(2) Writes to /dev/rfd0 that are not a multiple of 512 bytes produce
>    an error.  This results in "tar zcf /dev/rfd0" failing.  This worked
>    in 1.1R.

You are wrong with the term "worked". They didn't work at all, they
have been broken all the time. All i did for 1.1.5 was to clearly
reject all those requests that are not a multiple of the sector
size. (I've been a bit too lazy to do it for multiples of 512 bytes, i
enforced it to multiples of the physical sector size instead. Does
only make some difference if you'd like to use 1024-sectored disks.
They didn't really work before.)  All disk and tape device drivers
usually restrict the transfers this way.

You need to:

either

some program writing random garbage | dd conv=sync obs=<multiple of secsize> \
         > /dev/rfd...                                 ^^^^^^^^^^^^^^^^^^^^^
                                                 best to have it 15k or 18k

or (with newer GNU tars)

tar -cvz --block-compress -f /dev/rfd... bla foo mumble

Btw., /dev/rst* are in the same boat here.

-- 
cheers, J"org                             work:    joerg_wunsch@tcd-dresden.de
                                          private:   joerg_wunsch@uriah.sax.de
Steinbach's Guideline for Systems Programming:
        Never test for an error condition you don't know how to handle.