From: Simon Glass <sjg@chromium.org>
The legacy filesystem commands (ls, load, save, size, mkdir, rm, ln,
mv, fstype, fstypes) use the interface/dev:part syntax to access
filesystems directly. Move them to cmd/fs_legacy.c and add a new
CONFIG_CMD_FS_LEGACY (default y) to control their compilation.
This frees up cmd/fs.c for new VFS-based implementations that use
absolute paths through the virtual filesystem layer.
CONFIG_CMD_FS_GENERIC selects CONFIG_CMD_FS_LEGACY for backward
compatibility.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
cmd/Kconfig | 14 +++++++++++++-
cmd/Makefile | 2 +-
cmd/{fs.c => fs_legacy.c} | 0
3 files changed, 14 insertions(+), 2 deletions(-)
rename cmd/{fs.c => fs_legacy.c} (100%)
@@ -2973,7 +2973,19 @@ config CMD_FS_GENERIC
bool "filesystem commands"
help
Enables filesystem commands (e.g. load, ls) that work for multiple
- fs types.
+ fs types. When VFS is available these use absolute paths through
+ the virtual filesystem. Otherwise the legacy interface/dev:part
+ commands are used.
+
+config CMD_FS_LEGACY
+ bool "Legacy filesystem commands (ls, load, save, ...)"
+ depends on CMD_FS_GENERIC && !VFS
+ default y
+ help
+ Enables the legacy filesystem commands that use the
+ interface/dev:part syntax to access filesystems directly. These
+ include load, save, ls, size, mkdir, rm, ln, mv, fstype and
+ fstypes.
config CMD_FS_UUID
bool "fsuuid command"
@@ -93,7 +93,7 @@ obj-$(CONFIG_CMD_FLASH) += flash.o
obj-$(CONFIG_CMD_FPGA) += fpga.o
obj-$(CONFIG_CMD_LUKS) += luks.o
obj-$(CONFIG_CMD_FPGAD) += fpgad.o
-obj-$(CONFIG_CMD_FS_GENERIC) += fs.o
+obj-$(CONFIG_CMD_FS_LEGACY) += fs_legacy.o
obj-$(CONFIG_CMD_FUSE) += fuse.o
obj-$(CONFIG_CMD_FWU_METADATA) += fwu_mdata.o
obj-$(CONFIG_CMD_GETTIME) += gettime.o
similarity index 100%
rename from cmd/fs.c
rename to cmd/fs_legacy.c