From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Wed, 15 Oct 2008 13:01:56 +0200 Subject: [U-Boot] [PATCH] Handle environment variables like commands In-Reply-To: <20081015104550.GB6881@colossus> References: <1224065384-24171-1-git-send-email-sbabic@denx.de> <20081015104550.GB6881@colossus> Message-ID: <20081015110156.306B581C99CD@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Petri Lehtinen, In message <20081015104550.GB6881@colossus> you wrote: > > > The command interpreter checks always if an environment variable > > for that name exists and in this case the content of the variable > > is executed. It becomes possible to redefine all U-Boot commands. > > A new "builtin" command is added to be able to run builtin U-boot commands > > even if they are redefined. ... > It seems to me that the "builtin" command itself can still be > redefined. Is this an issue? Good catch. Yes, this must be prevented. Any variable named "builtin" must be ignored here - i. e. we should issue an erro when someone tries a "setenv", and ignore this variable explicitly (just in case someone sneaks this into the default environment, or uses un-fixed Linux tools to create such a variable). Thanks. 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 Objects in mirror are closer than they appear.