FAT compatibility - increasing file size
Posted: Fri Sep 01, 2006 9:27 am
hello,
at the moment im trying to implement a basic FAT12 support in my os.
While implementing a simple create_file function one faces the problem, that the cluster of the directory where we're supposed to create the file in is full. As the documentation on fat is not that extensive, I thought it should be as simple as adding another cluster into the working dir's chain. For my code this works an the dir grows, the file is created and it can be opened afterwards.
But if I mount the disk image in linux only the 16 entries that are stored in the first cluster show up, but not the one I just added.
This problem does only appear in this situation, while creating files in a directory with some empty slots left my code seems to be compatible with the way linux handles fat.
Therefore my question is if there is any further secret magic to be done to grow FAT directories or if my approach was right but my code must be wrong? ???
at the moment im trying to implement a basic FAT12 support in my os.
While implementing a simple create_file function one faces the problem, that the cluster of the directory where we're supposed to create the file in is full. As the documentation on fat is not that extensive, I thought it should be as simple as adding another cluster into the working dir's chain. For my code this works an the dir grows, the file is created and it can be opened afterwards.
But if I mount the disk image in linux only the 16 entries that are stored in the first cluster show up, but not the one I just added.
This problem does only appear in this situation, while creating files in a directory with some empty slots left my code seems to be compatible with the way linux handles fat.
Therefore my question is if there is any further secret magic to be done to grow FAT directories or if my approach was right but my code must be wrong? ???