From mboxrd@z Thu Jan 1 00:00:00 1970 From: Detlev Zundel Date: Tue, 05 Aug 2008 15:59:27 +0200 Subject: [U-Boot-Users] simplify bootm command In-Reply-To: <4898444E.6070509@ge.com> (Jerry Van Baren's message of "Tue, 05 Aug 2008 08:15:10 -0400") References: <20080805110511.47ACF24851@gemini.denx.de> <4898444E.6070509@ge.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, > Wolfgang Denk wrote: >>> One minor flaw, I don't see how "bootm" the env script could run "bootm" >>> the built-in command, because it would instead recursively run "bootm" >>> the env script if scripts have higher priority and the command line >>> "bootm" would run the built-in "bootm" if scripts have lower priority. >> >> That's why I think we should have an explicit "builtin" command, i. e. >> command with the name "builtin" that will always run the corresponding >> builtin command, no if there is a "command alias" or not - similar to >> the bash command: > > Ahh, I missed the point that "builtin" was a command, not a concept. > Yes, that solves the dilemma neatly. > > WRT Albert's comment: >> ... and make sure that one can *never* define an environment variable >> called 'builtin', and even remove any such definition if found in the >> environment when reading it from persistent memory at boot. > > ...another way of handling this would be to special-case the "builtin" > command so that it takes precedence over a "builtin" env variable (i.e. > ignore an env variable named "builtin"). I'm not wild about > auto-deleting env variables. But ignoring it by having a separate precedence is again a special case which we want to avoid ;) So I agree 100% with the whole idea and agree with Albert to "fail loudly" in this case (another pretty clever Unix design philosophy). Cheers Detlev -- Directories are added, deleted, and rearranged much as you would expect, even if you don't know it's what you'd expect. -- Tom Lord in TLA Documentation -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de