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
EXT2 driver cannot find directory table
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.
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.