OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 7:21 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: FAT32 root directory
PostPosted: Sun Mar 03, 2019 1:37 pm 
Offline

Joined: Wed Jan 02, 2019 5:18 am
Posts: 4
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 ?


Top
 Profile  
 
 Post subject: Re: FAT32 root directory
PostPosted: Sun Mar 03, 2019 2:19 pm 
Offline
Member
Member

Joined: Tue Mar 04, 2014 5:27 am
Posts: 1108
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).


Top
 Profile  
 
 Post subject: Re: FAT32 root directory
PostPosted: Sun Mar 03, 2019 2:29 pm 
Offline

Joined: Wed Jan 02, 2019 5:18 am
Posts: 4
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


Top
 Profile  
 
 Post subject: Re: FAT32 root directory
PostPosted: Sun Mar 03, 2019 6:59 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5099
The only way to tell how many entries is to read the entire root directory and count them.


Top
 Profile  
 
 Post subject: Re: FAT32 root directory
PostPosted: Sun Mar 03, 2019 11:21 pm 
Offline
Member
Member
User avatar

Joined: Sat Nov 22, 2014 6:33 pm
Posts: 934
Location: USA
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 50 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group