OSDev.org

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

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: EXT2 driver cannot find directory table
PostPosted: Fri Oct 18, 2019 12:55 pm 
Offline
Member
Member

Joined: Tue Aug 30, 2016 1:31 pm
Posts: 69
Hello everyone,

I am trying to get the list of files of the root directory but it gives me a random file...
Can someone tell me what Im doing wrong?
https://github.com/AdeRegt/SanderOSUSB/ ... l/fs/ext.c


Top
 Profile  
 
 Post subject: Re: EXT2 driver cannot find directory table
PostPosted: Wed Oct 23, 2019 11:57 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4594
Location: Chichester, UK
I notice that you haven't had any replies to this, which is a bit discouraging. I suspect the reason is that it's quite a chunk of code and it isn't particularly well-commented. I found it difficult to follow.

I'd suggest that what you want to do is to single-step this in a debugger to find where things deviate from what you expect. When developing my own ext2 driver I wrote it first of all as a normal Linux user program, using an image file. This makes the debugging much easier. It's then trivial to convert it to a driver for your OS. Apart from anything else this will be a good way of improving your debugging skills.

If you inspect the variables at each step, cross-referencing with a hex dump of the file system, it should become obvious where the error is.


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: Google [Bot], SemrushBot [Bot] and 160 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