CompuServe Thread

#Get_DiskBlock

6 messages in this thread
#1048From: Mike LawrenceSep 24, 1990 10:13 PM
Does anyone know roughly how to read an AmigaDOS disk block? The Action_getdiskblock dos packet type is not implemented. I am looking for something like what the disked program must be doing to read in a block by 'key' number and display the pointers to the other blocks, etc. Thanks, Mike.
#1059From: Don Curtis/SYSOPSep 25, 1990 1:32 AM
Use a standard i/o request (via DoIO()). Use 'key' number times block size as the io_Offset value in the IOStdReq structure. Look in Chapter 19 of the ROM Kernel Manual…Libraries and Devices. As to pointers and so forth…that you'll have to deal with in your own code by interpreting the data in the block…or by searching for the parent block (depending on if FFS or OFS).
#1084From: Mike LawrenceSep 25, 1990 8:28 PM
Thanks a lot. That should get me going. I have played around with disked enough to be fairly familiar with the disk structure. I just needed to know how to read a block. Thanks! Mike
#1094From: Mike LawrenceSep 25, 1990 11:12 PM
I got my program to read the root block from a floppy. Thanks. Now I have a new problem (always goes that way). After I do the CmdRead the floppy drive light stays on forever. I have tried sending a CmdClear, CmdStop, etc. but no luck so far. Do you know what the secret is? Thanks again for your help.
#1103From: Don Curtis/SYSOPSep 26, 1990 1:19 AM
Close the device via CloseDevice(), but don't forget to re-open it before you try any more i/o calls on it.
#1137From: Mike LawrenceSep 26, 1990 8:57 PM
I am doing a CloseDevice. Perhaps it's not really closing somehow. At least I know I'm on the right track. Thanks for the help. Mike