busybox e2fsprogs on powerpc
Ken McGuire
kenm at desertweyr.com
Sun Jan 22 22:35:00 UTC 2006
I'll give it a try,
The e2fs code is very similar to that from e2fsprogs-1.38.
On 22 Jan 2006 at 15:54, Rob Landley wrote:
> On Sunday 22 January 2006 14:23, Rob Landley wrote:
> > Once I've got that, I can compare the two and see where busybox is screwing
> > up, and hopefully fix it.
>
> And I've got it. And every single field is backwards. Oh yeah.
>
> Wow, this ext2 source is a hideous mess. Randomly tracing through the
> #includes I found closefs.c #includes ext2_fs.h which includes ext2_types.h
> which is a single line #including linux/types.h (so why does that file even
> _exist_? Why not #include the other file directly?)
>
> And of course over in ext2fs.h we find htis comment:
>
> /*
> * Ext2/linux mode flags. We define them here so that we don't need
> * to depend on the OS's sys/stat.h, since we may be compiling on a
> * non-Linux system.
> */
>
> And this is the same source code that's doing "#include <linux/types.h>".
>
> Beautiful.
>
> Would anybody who has already touched the ext2 code like to venture an opinion
> as to why we have both ENABLE_SWAPFS and EXT2FS_ENABLE_SWAPFS? What's the
> difference between the two?
>
This part is identical to that in ..../e2fsprogs-1.38/lib/ext2fs/ext2fs.h
The variables ENABLE_SWAPFS and EXT2FS_ENABLE_SWAPFS are used all over the
place in both busybox & e2fsprogs-1.38. the difference is that ENABLE_SWAPFS
is set during the configure process of e2fsprogs-1.38 but not anywhere in
busybox, untill your patch.
Unfortunately, the change to e2fsbb.h results in an undefined reference to
ext2fs_swap_super (and a bunch of others). So, I guess busybox's e2fs stuff
isn't quite ready for prime time. ;>(
> Ok, here's a wild guess at a patch. It's ugly, but it might work. Care to
> give it a try?
>
> Rob
> --
> Steve Ballmer: Innovation! Inigo Montoya: You keep using that word.
> I do not think it means what you think it means.
>
...ken...
More information about the busybox
mailing list