u-boot-brain/fs
Stephen Warren e9b0f99e82 fs: fix do_fsload() handling of optional arguments
Most arguments to the shell command do_fsload() implements are optional.
Fix the minimum argc check to respect that. Cater for the situation
where argv[2] is not provided.

Enhance both do_fsload() and do_ls() to check the maximum number of
arguments too. While this check would typically be implemented via
U_BOOT_CMD()'s max_args parameter, if these functions are called
directly, then that check won't exist.

Finally, alter do_ls() to check (argc >= 4) rather than (argc == 4) so
that if the function is enhanced to allow extra arguments in the future,
this test won't need to be changed at that time.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
2012-11-04 11:00:24 -07:00
..
cbfs fs: Add a Coreboot Filesystem (CBFS) driver and commands 2012-10-22 08:29:55 -07:00
cramfs gunzip: rename z{alloc, free} to gz{alloc, free} 2012-04-30 16:54:51 +02:00
ext4 fs: separate CONFIG_FS_{FAT, EXT4} from CONFIG_CMD_{FAT, EXT*} 2012-10-29 14:21:19 -07:00
fat fs: separate CONFIG_FS_{FAT, EXT4} from CONFIG_CMD_{FAT, EXT*} 2012-10-29 14:21:19 -07:00
fdos Convert ISO-8859 files to UTF-8 2011-08-04 23:34:02 +02:00
jffs2 linux/compat.h: rename from linux/mtd/compat.h 2012-04-30 16:54:51 +02:00
reiserfs cmd_reiser: use common get_device_and_partition function 2012-09-25 14:49:18 -07:00
ubifs ARM: prevent misaligned array inits 2012-10-15 11:53:07 -07:00
yaffs2 yaffs2: Fix GCC 4.6 compile warnings 2012-10-08 11:15:04 -07:00
zfs ZFS: Fix compile warning in fs/zfs/zfs.c (GCC 4.6.4 from ELDK 5.2.1) 2012-11-02 15:20:40 -07:00
fs.c fs: fix do_fsload() handling of optional arguments 2012-11-04 11:00:24 -07:00
Makefile fs: add filesystem switch libary, implement ls and fsload commands 2012-10-29 14:21:20 -07:00