From: J.C. Wren Date: Tue, 4 Aug 2009 16:05:12 -0400 Subject: [U-Boot] Normal command line behavior? In-Reply-To: <20090804194840.GA27240@b07421-ec1.am.freescale.net> References: <17434f2e0908031219h7d630d9sc019cf726ce9c1c8@mail.gmail.com> <4A773C1C.7080109@ge.com> <20090803215830.969568340728@gemini.denx.de> <17434f2e0908040907j41a235a0uce4f794e689c4d52@mail.gmail.com> <20090804194840.GA27240@b07421-ec1.am.freescale.net> Message-ID: <17434f2e0908041305i629aef0dmbf23e620a61fe505@mail.gmail.com> 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, Aug 4, 2009 at 3:48 PM, Scott Wood wrote: > On Tue, Aug 04, 2009 at 12:07:17PM -0400, J.C. Wren wrote: > > All fair points. > > > > It appears that the 'nand' commands don't use the new parser structure. > > Do you mean U_BOOT_CMD_MKENT, find_cmd_tbl, etc? Not sure about that part. I just went back and looked at cmd_i2c.c, cmd_yaffs2.c and a few others and I see they all do sub-command processing with strncmp(), too. I had looked at one other file prior to my post, and thought I understood sub-commands were plugged-in with macros. My mistake. I forgot to mention that all the yaffs commands are top level. If I were me, I'd like to see the yaffs command broken down into a sub-menu. That's just a minor nit, as having them all in the top level makes the help a little more unwieldy. And they'd be used infrequently enough that having them under a 'y' sub-menu wouldn't make them much more difficult to use. > > > The 'nand' and 'nboot' commands use the U_BOOT_CMD macro, and have > > repeatable defined as 1. The 'nand' command is doing it's own > > sub-command parsing (via strcnmp()'s), and as a result, all 'nand' > > commands are repeatable. That probably isn't a good idea, and I would > > request the the 'nand' command itself be made non-repeatable. > > The one nand command that probably should be repeatable is "nand dump", > with auto-increment similar to "md". Makes sense. > > > -Scott >