Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
I was wondering how the file or directory handlers can be implemented. I already have an IDE driver to read LBA28 and LBA48, and also can detect the partitions present in a hard disk, and also have all of the support I need to read and write freely to ATA hard disks.
Should I create a fixed cache file or partition in the disk to keep track of the full path?
Is it even neccessary to keep the full path at all times?
Or is it better to recursively find the start of each part of the path and get rid of it to continue with the following part of the path until finding the start of the final "c.doc" file?
Should the pathname have a size limit, or should it be permitted to have even 512 Kilobytes of pathname or even more?
Should the pathname have a size limit, or should it be permitted to have even 512 Kilobytes of pathname or even more? Or should the string size be filesystem-dependent?
Are there SCSI, ATA or SATA hard disks with more than 512 byte sectors?
Those are all the questions I can recall by now; I really don't find a solution that seems smooth (i.e., it wouldn't be nice having to read a cache file every time one needs file information or having unneccessary amounts of allocated and deallocated memory just to implement file handlers).
Are you trying to design a filesystem, or implement a driver for an existing filesystem?
Actually, which ever you want, I suggest you look into classic Unix filesystems. Ext2 (at least in it's basic form) is pretty simple example, actually.
The real problem with goto is not with the control transfer, but with environments. Properly tail-recursive closures get both right.
Just trying to implement filesystem handlers for the existing FS. Maybe somebody knows a more reliable way than using somehow unnecessarily big memory chunks for them or relying on a big static swap file or partition.
What about storing the I-node (or first custer of the file if FAT fs) of the directory entry when the file is first opened, so all that is needed when reading an writing is to use ths I-node value as a base to perform the operation.
also you may want to store the seek position.
Microsoft: "let everyone run after us. We'll just INNOV~1"