FAT: on LFNs
FAT: on LFNs
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)
thanks, eddyb.
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)
thanks, eddyb.
Re: FAT: on LFNs
Here are some answers.
Regard
System123
Yes, The LFN entry is right before the standard entry.shiner wrote:All the LFN entries are before the direntry associated?
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 0x01shiner wrote:A valid LFN entry won't have the first byte 0x00?
Not sure what you are referring to. The LFN entries follow on each other ie:shiner wrote:Are they in some order or they can be in a random order?
- LFN Entry 1 (0x01)
- LFN Entry 2 (0x02)
- LFN Entry 3 (Last one - 0x40)
- Standard Entry
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 0x01shiner 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)
Regard
System123
Gizmic OS
Currently - Busy with FAT12 driver and VFS
Currently - Busy with FAT12 driver and VFS
Re: FAT: on LFNs
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.
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.
Re: FAT: on LFNs
Short names are easy to implement. I just keep an array of used names on the disk for reference
Gizmic OS
Currently - Busy with FAT12 driver and VFS
Currently - Busy with FAT12 driver and VFS
Re: FAT: on LFNs
Long names are easier. I say "Works great for my operating system, you use windows you're on your own if it processes short names."
Re: FAT: on LFNs
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.
Cheers,
Adam
Cheers,
Adam
Re: FAT: on LFNs
I should say No RTFMs, i've read that doc.LoseThos wrote:http://www.microsoft.com/whdc/system/platform/firmware/fatgen.mspx
anyway, thanks, cause i have the answers:
1, there a non-zero number
2, yep
3, maybe random
4, yeah
Edit:
AJ: heard that thing depends on where do you live. i'm in romania and i've read somewhere they apply only to US
Last edited by eddyb on Tue Jan 06, 2009 12:53 pm, edited 2 times in total.
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: FAT: on LFNs
LoseThos: You seriously got to calm the frickkin' hell down.