U211344@HNYKUN11.BITNET (Olaf 'Rhialto' Seibert) (12/18/88)
[Mike Ditto mailed me about RDF:, and I tried to reply by mail but it seems the CUNYVM gateway does not know any of the addresses he gave me. So here it is... it is of some general interest anyway..] > Olaf, > > Thanks very much for writing the RDF handler, I have found > it quite useful already. I can now transfer files between Amiga Unix > and AmigaDos using "tar" on floppies. I have had the tar program on > the Amiga for a long time, but it wasn't very useful because there was > no way to give it a filename for the raw floppy. > > I am having one problem with it: It does not seem to have a > default device and unit; I always have to open "RDF:/dtrackdisk.device/u2". > From the quick look I took at your code, it seems like it should pick > up the "Device=" Mountlist entry, but it doesn't work for me. Any idea > what might be wrong? Of course it works for me, otherwise I would not have sent it out. Maybe the string 'trackdisk.device' is not ^0 terminated in your situation (like it should) so that OpenDevice does get a name longer than what was intended. But I remember having read somewhere that that string from the filesystem environment was supposed to be already ^0 terminated; otherwise I would have made a copy, of course. Just a wild guess, I'm afraid... > I encountered another problem, although it is not your fault. > The open() function provided with Aztec C does some very silly things > when opening a file with (O_WRONLY|O_CREAT|O_TRUNC) modes: It first > checks if the file exists, and if it does, it tries to delete it! > Since your handler won't delete things, Aztec's open() returns failure. > This is definitely Aztec's fault, not yours, but I was wondering if > you have thought about a solution. Hm, the handler does know ACTION_DELETE_FILE, and should return success regardless of what it is supposed to delete. But I must admit I never thought of testing it; the comments that 'by default, return success' (or something like that) at the top of the loop convinced me that that would be taking care of that. :-) [...] > Also, have you considered making RDF: more general, i.e., > removing all the trackdisk-specific parts? Right now, for example, > you send the trackdisk motor-off command when the device is closed, > but this might mean something completely different to another device. > I realize this is difficult. You would probably have to somehow > determine whether the opened device was trackdisk, and do all the > special stuff in that case. Yes I thought of that. In fact, that was the original intention, with as most useful application applying it to the trackdisk.device. The name of the handler would be EXEC: in that case... But then when I re-read the docs those 512 byte blocks made things a little more complicated. In fact, with the current trackdisk.device the sectors do not seem to be necessary at all. [Maybe the block restrictions could be dropped in 1.4 ?] Then, once it started to become trackdisk-specific, it had to be done right, and you must of course turn off the motor. There is one problem in determining if a device is trackdisk compatible: you don't know how to do it. Using the name is not possible; there are hddisk.devices, ramdives, scottdisks, etc. And issuing a trackdisk command to see if it works does not seem to be a good idea.... And, if you wish to use serial.device, you have some special cases as well, just as with the clipboard, etc. It would be easier to make a separate handler for each. It is too bad that the Amiga devices are not as orthogonal as they seem to be at first. > Anyway, I found your program useful and interesting. Keep > up the good work. > -=] Ford [=- Thanks! > "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 > SYSTEM ZODIAC 12/16/88 Freely_Distributable=Greetings(Not_For_Any_Commercial_Purpose)-> Olaf.Seibert; +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Q: How many lines does it take to screw in a disclaimer? A: Only two. --- Olaf Rhialto Seibert the Marvellous --- U211344@hnykun11.bitnet --- Study safely - stop deets 7167 BYTES FREE Too painful to do right *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*