From: Kumar Gala Date: Thu, 18 Sep 2008 11:32:01 -0500 Subject: [U-Boot] [RFC] bootm: Add sub commands In-Reply-To: <20080918065428.1E84C248C6@gemini.denx.de> References: <1221688841-3197-1-git-send-email-galak@kernel.crashing.org> <20080918065428.1E84C248C6@gemini.denx.de> Message-ID: <6ADB3DCC-693A-41EB-BDCD-0B20865F677E@kernel.crashing.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sep 18, 2008, at 1:54 AM, Wolfgang Denk wrote: >> +int do_bootm_subcommand (cmd_tbl_t *cmdtp, int flag, int argc, >> char *argv[]) >> +{ >> + int ret = 0; >> + >> + /* start */ >> + if (argv[1][0] == 's') { > > I think just matching on the first letter is to restrictive; we'll end > up with artificical command "names" that nobody can remember. I'm happy to move to using strncmp, but I agree with Jerry that other subcommand do the shortest match possible. - k