
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 10/10/12 17:05, Stephen Warren wrote:
From: Stephen Warren swarren@nvidia.com
Implement "ls" and "fsload" commands that act like {fat,ext2}{ls,load}, and transparently handle either file-system. This scheme could easily be extended to other filesystem types; I only didn't do it for zfs because I don't have any filesystems of that type.
Signed-off-by: Stephen Warren swarren@nvidia.com --- There are a couple FIXMEs in here:
- In fs/fs.c, code is ifdef on CONFIG_CMD_FAT or CONFIG_CMD_EXT2.
This means that the new commands and code can only be enabled if the "legacy" {fat,ext2}{ls,load} are enabled. What we really want is CONFIG_FS_FAT and CONFIG_FS_EXT2 to enable the filesystem code, and then CONFIG_CMD_FAT, CONFIG_CMD_EXT2, CONFIG_CMD_FS to only affect the command implementations. However, that would require making every include/config/*.h that sets the current defines also set more. I suppose that's a fairly mechanical change though, so easy enough to implement. Does that seem like a reasonable approach to people?
How about a new CONFIG_CMD_GENERIC_FS for the new ls/fsload (and any later commands like write that get added) and once most filesystems are converted we can think about a transition plan?
- In common/Makefile, I need to make this conditional upon
CONFIG_CMD_FS or similar.
Also, I wonder if the fs/* and common/* should be two separate patches or not?
One is fine.
- -- Tom