From: Tom Rini Date: Sun, 4 Nov 2012 11:30:04 -0700 Subject: [U-Boot] [PATCH 1/3] fs: fix do_fsload() handling of optional arguments In-Reply-To: <149240252.289542.1351636135124.JavaMail.root@advansee.com> References: <1351634659-16107-1-git-send-email-swarren@wwwdotorg.org> <149240252.289542.1351636135124.JavaMail.root@advansee.com> Message-ID: <20121104183004.GI15839@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, Oct 30, 2012 at 11:28:55PM +0100, Beno??t Th??baudeau wrote: > On Tuesday, October 30, 2012 11:04:17 PM, Stephen Warren wrote: > > From: Stephen Warren > > > > 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 > [--snip--] > > For the series: > Reviewed-by: Beno??t Th??baudeau And for the series, applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: