On Sat, Aug 12, 2017 at 8:17 AM, Alexander Graf <ag...@suse.de> wrote:
> On 10.08.17 20:29, Rob Clark wrote:
>> Yes, this is super-hacky.  The FAT code is quite ugly, and this doesn't
>> improve things.  But it doesn't make it significantly worse either.  The
>> better option would be a massive FAT re-write to get rid of the hacky
>> way that fat_file_ls() works.  Volunteers welcome.
>> Signed-off-by: Rob Clark <robdcl...@gmail.com>
> What concerns me the most in patch 1/15 and this patch is the limited scope.
> Yes, you make readdir work for FAT, but all other file systems are still
> unimplemented. In fact, they're even all still implementing their own
> hand-written ls logic.
> One of the goals of the efi_loader code is to integrate with U-Boot as much
> as possible, to reuse code where we can. And if current interfaces are
> terrible, I think it's ok to just replace them for something that fits
> everyone's needs better.
> How feasible do you think it would be to implement an ls function based on
> readdir and just convert all file systems to it, completely replacing the
> current (quite crude) ls logic?

So I went ahead and re-wrote the fat directory traversal[1].  I should
be posting to list in the next day or two but still want to make a few
small cleanups.  (And to get rid of some hacks in efi_file, I think I
need to add an fs_isdir() too :-/)

As far as the various other filesys's, I agree that a generic ls would
be a nice goal.  But the scope of the efi_loader patchset has already
expanded way too much, and at this point I'm pretty much limited by
what I can finish this weekend.  At the end of the day, FAT is all
that UEFI expects, so I think it is fine to let the other filesystems
catch up on their own schedule.

I could write a generic ls helper, and just plug it in for FAT, which
could be re-used later when other filesys's gain readdir support.


[1] https://github.com/robclark/u-boot/commits/readdir
U-Boot mailing list

Reply via email to