ditto@cbmvax.UUCP (Michael "Ford" Ditto) (01/13/89)
In article <5652@cbmvax.UUCP> I wrote: >This is the source to my "fdread" and "fdwrite" commands [ ... ] In article <498@cogent.UUCP> mark@cogent.UUCP (Mark Steven Jeghers) writes: >Sounds good to me, but tell me this? What can these programs do that >could not be achieved via the "dd" command? This is not a criticism, >just a question. The only thing these programs do is ioctl the floppy drive into a "raw" mode where the driver won't require a partition table to be present, and then exec(2) whatever program is used to to the I/O. Because the driver doesn't stay in the "raw" mode after the device is closed, it is not possible to run one program to do the ioctl and then run the actual I/O program. Thus the somewhat strange requirement of giving the I/O command as arguments to fd{read,write}. I suppose they could also have been set up to be used like: ( fdctl ; tar -xvf - ) < /dev/rfp020 but I seem to remember having some trouble when I tried it that way. fd{read,write} don't do any I/O; that is done by the program of your choice; I use "dd" quite often. (For example: fdread /dev/rfp020 dd ibs=9k | tar -xvf - works quite nicely, doing its I/O a whole cylinder at a time). -- -=] Ford [=- "The number of Unix installations (In Real Life: Mike Ditto) has grown to 10, with more expected." ford@kenobi.cts.com - The Unix Programmer's Manual, ...!sdcsvax!crash!elgar!ford 2nd Edition, June, 1972. ditto@cbmvax.commodore.com