OSDev.org
https://forum.osdev.org/

FAT32 root directory
https://forum.osdev.org/viewtopic.php?f=1&t=33555
Page 1 of 1

Author:  Rocobo [ Sun Mar 03, 2019 1:37 pm ]
Post subject:  FAT32 root directory

How many entries there is in FAT32 ?
In the BPB the value of Root Directory Entries is '00 00'
How can i calculate how many entries i have in my disk ?

Author:  alexfru [ Sun Mar 03, 2019 2:19 pm ]
Post subject:  Re: FAT32 root directory

Rocobo wrote:
How many entries there is in FAT32 ?
In the BPB the value of Root Directory Entries is '00 00'
How can i calculate how many entries i have in my disk ?


The same way as with any other (non-root) directory or file.
Follow the cluster chain starting at BPB_RootClus (I'm assuming you have fatgen103.doc).

Author:  Rocobo [ Sun Mar 03, 2019 2:29 pm ]
Post subject:  Re: FAT32 root directory

alexfru wrote:
Rocobo wrote:
How many entries there is in FAT32 ?
In the BPB the value of Root Directory Entries is '00 00'
How can i calculate how many entries i have in my disk ?


The same way as with any other (non-root) directory or file.
Follow the cluster chain starting at BPB_RootClus (I'm assuming you have fatgen103.doc).



no....
I just want loop over all entries and print the files name
so i need to know how many entries there is in the disk

Author:  Octocontrabass [ Sun Mar 03, 2019 6:59 pm ]
Post subject:  Re: FAT32 root directory

The only way to tell how many entries is to read the entire root directory and count them.

Author:  BenLunt [ Sun Mar 03, 2019 11:21 pm ]
Post subject:  Re: FAT32 root directory

What my friends are saying is that FAT32 does not have a fixed root directory like FAT12 and FAT16 do. The FAT32 root directory is just like a sub-directory, it has Allocation Units and can be of any size up to the disk size (in theory).

Ben
- http://www.fysnet.net/osdesign_book_series.htm

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/