From: J.C. Wren Date: Tue, 4 Aug 2009 12:07:17 -0400 Subject: [U-Boot] Normal command line behavior? In-Reply-To: <20090803215830.969568340728@gemini.denx.de> References: <17434f2e0908031219h7d630d9sc019cf726ce9c1c8@mail.gmail.com> <4A773C1C.7080109@ge.com> <20090803215830.969568340728@gemini.denx.de> Message-ID: <17434f2e0908040907j41a235a0uce4f794e689c4d52@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 All fair points. It appears that the 'nand' commands don't use the new parser structure. 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. --jc On Mon, Aug 3, 2009 at 5:58 PM, Wolfgang Denk wrote: > Dear Jerry Van Baren, > > In message <4A773C1C.7080109@ge.com> you wrote: > > > > It is a configuration/design decision: see include/command.h line 46ff, > > struct cmd_tbl_s, field "repeatable". This is configured via the > > U_BOOT_CMD macro. > > > > < > http://git.denx.de/?p=u-boot.git;a=blob;f=include/command.h;h=55caa6eaf888cdb916d3937a5054ad862ec0e0ab;hb=HEAD#l46 > > > > > > Sometimes it is nice (e.g. sequencing through memory dumps), sometimes > > it bites (you found one of those!). IMHO, it is enabled in places where > > it would be better to rely on command line recall rather than the repeat > > function. > > The general rule is that any command that is non-destructive is > repeatable, i. e. a "tftp" will be repeated, while an "erase" will > not. > > Indeed, today command line history makes it partially dispensable, but > often at the cost of more typing (think about using the "md" command). > > > I think the repeat functionality predated the command line recall > > functionality, so it use to be more desirable to repeat the command > > because there wasn't an alternative way to repeat the command. > > Correct, this, and because that was exactly what I wanted when I > implemented it :-) > > Best regards, > > Wolfgang Denk > > -- > DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany > Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de > The software required `Windows 95 or better', so I installed Linux. >