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

EXT2 driver cannot find directory table
https://forum.osdev.org/viewtopic.php?f=1&t=35545
Page 1 of 1

Author:  SanderR [ Fri Oct 18, 2019 12:55 pm ]
Post subject:  EXT2 driver cannot find directory table

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

Author:  iansjack [ Wed Oct 23, 2019 11:57 am ]
Post subject:  Re: EXT2 driver cannot find directory table

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.

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