OSDev.org

The Place to Start for Operating System Developers
It is currently Mon Mar 18, 2024 10:58 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: What does linux put in inode 2 of ext2 filesystem?
PostPosted: Sun Apr 05, 2015 5:51 am 
Offline
Member
Member

Joined: Tue Jan 20, 2015 9:01 am
Posts: 119
https://www.imageupload.co.uk/image/Zc88
What is this in red supposed to mean? Does not look like a file/directory/etc entry. File length 0BBh, file type 0CEh... Odd...
Could someone enlighten me?

Regards,
glauxosdev


Top
 Profile  
 
 Post subject: Re: What does linux put in inode 2 of ext2 filesystem?
PostPosted: Sun Apr 05, 2015 9:32 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4591
Location: Chichester, UK
It's an unused part of the block. I've no idea how it got there in your particular instance as it doesn't look like a deleted entry. Whatever, it's doing no harm.


Top
 Profile  
 
 Post subject: Re: What does linux put in inode 2 of ext2 filesystem?
PostPosted: Sun Apr 05, 2015 12:20 pm 
Offline
Member
Member

Joined: Tue Jan 20, 2015 9:01 am
Posts: 119
And how should my code know how to skip it?

Quote:
I've no idea how it got there in your particular instance
I formatted my flash drive as ext2, I created a folder "sys" and I copied "docs", "programs", "source" and "system".

Edit: sometimes the length of this unused block is specified in place of file name length.


Top
 Profile  
 
 Post subject: Re: What does linux put in inode 2 of ext2 filesystem?
PostPosted: Sun Apr 05, 2015 1:23 pm 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4591
Location: Chichester, UK
Quote:
And how should my code know how to skip it?
I've said it before, but it looks like I have to say it again.

Before you can work with ext2fs at a low level you have to understand the filesystem, its structures, and how they are used. And you have to at the very least read that document that I linked to describing the ext2 filesystem. It is evident that you have not yet reached that stage. I suggested before a way that you could work towards that level of enlightenment; you rejected my suggestion then, so there seems to be little point in repeating it now.

There is no easy path to OS development, and asking someone else to help you every time you hit something that you don't understand is not the magical path.

But, to answer your question: your code knows how to skip it because it reads the directory from the disk in the way it was designed to be read.


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

All times are UTC - 6 hours


Who is online

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