diff options
author | Stephen Warren <swarren@nvidia.com> | 2012-10-30 12:04:17 +0000 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2012-11-04 11:00:24 -0700 |
commit | e9b0f99e8243e3146f3b5f4ef91f4b6c8f4452c0 (patch) | |
tree | 88a8c850a714be1cc7b2db07620732bdcedcd8bd /tools/binutils-version.sh | |
parent | 51bdad67cb6738c5d0e78084cf3e3baa216f4d2f (diff) | |
download | u-boot-imx-e9b0f99e8243e3146f3b5f4ef91f4b6c8f4452c0.zip u-boot-imx-e9b0f99e8243e3146f3b5f4ef91f4b6c8f4452c0.tar.gz u-boot-imx-e9b0f99e8243e3146f3b5f4ef91f4b6c8f4452c0.tar.bz2 |
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>
Diffstat (limited to 'tools/binutils-version.sh')
0 files changed, 0 insertions, 0 deletions