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'm writing a FAT driver and i did bootsector, direntries parsing and i can read a file. i have no FAT parsing, as i have no file over 4k on the test partition .
Well, i want to do LFNs(Long FileName entryes) and i don't know all about it. here i have some question:
1. A valid LFN entry won't have the first byte 0x00?
2. All the LFN entries are before the direntry associated?
3. Are they in some order or they can be in a random order?
4. The first LFN entry for a file(the first on the disk) is the last one?(i mean the order byte to be | 0x40)
shiner wrote:All the LFN entries are before the direntry associated?
Yes, The LFN entry is right before the standard entry.
shiner wrote:A valid LFN entry won't have the first byte 0x00?
The first byte of the LFN is normally 0x41. The 0x01 part tells us that it is the 1st LFN for the standard entry. The 0x40 tells us that this LFN is also the last one for the standard entry. So the first byte of a valiid LFN can not be 0x00 but it could be 0x01
shiner wrote:Are they in some order or they can be in a random order?
Not sure what you are referring to. The LFN entries follow on each other ie:
LFN Entry 1 (0x01)
LFN Entry 2 (0x02)
LFN Entry 3 (Last one - 0x40)
Standard Entry
shiner wrote:The first LFN entry for a file(the first on the disk) is the last one?(i mean the order byte to be | 0x40)
AFAIK and don't take my word for it, the entries are in order. ie the 1st LFN is the first part of the filename and has 0x01
Regard
System123
Gizmic OS
Currently - Busy with FAT12 driver and VFS
My FAT code works except short file names. You must make a unique name with a tilde,Number Micro~1. You must check for unique short names. That's more trouble than it's worth... I said screw-it.
I have a native file system with 26 letter names, max. I simply don't allow FAT names longer and never will. "LFN" in my operating systenm is "LEx file node". There are upto 8 levels deep for #include and each level is a LFN.
Just a word of warning in case you didn't already know - I believe that LFN handling in FAT is one of the areas of FAT that has current patents relating to it. While unlikely that a hobby OS will be flagged by MS, be careful and make sure you're not doing anything illegal.
LoseThos: You seriously got to calm the frickkin' hell down.
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.