OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Apr 19, 2024 5:18 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Detecting the last directory entry in an ISO9660 filesystem
PostPosted: Sat Jun 29, 2019 9:43 pm 
Offline

Joined: Sun May 29, 2016 10:53 am
Posts: 13
Based on all the ISO9660 documentation I've found, I'm operating under the following assumptions:

1) Directory entries cannot be larger than 255 bytes
2) Directory entries always end in the same logical block as the one in which they started

To detect when you've hit the last entry for a directory, it seems to be a case of checking that the first byte following the end of the previous entry has a value of zero (the 'Length of Directory entry' field).

Due to assumption #2 above however, it seems to me that if you're less than 255 bytes from the end of the current block, there might just be zero-padding to the end of this block, and then more directory entries in the next block. However, I haven't found that confirmed in so many words anywhere. Is this how it works? Is there a scenario where checking the start of the next logical block would be reading unrelated data?


Top
 Profile  
 
 Post subject: Re: Detecting the last directory entry in an ISO9660 filesys
PostPosted: Tue Jul 02, 2019 10:13 pm 
Offline

Joined: Sun May 29, 2016 10:53 am
Posts: 13
Finally realised what the answer to this is. The first directory entry describes itself, so I can look at the data length field and divide by the logical block size to know how many blocks are used for all the directory's entries combined.


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 145 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