From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerlando Falauto Date: Fri, 30 Mar 2012 15:25:17 +0200 Subject: [U-Boot] [PATCH v2 3/3] env: make "env default" selective, check and apply In-Reply-To: <201203301509.42937.marex@denx.de> References: <1321634955-5561-1-git-send-email-gerlando.falauto@keymile.com> <201203292225.33982.marex@denx.de> <4F75AE79.7020500@keymile.com> <201203301509.42937.marex@denx.de> Message-ID: <4F75B43D.8020404@keymile.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 03/30/2012 03:09 PM, Marek Vasut wrote: > Dear Gerlando Falauto, > >> On 03/29/2012 10:25 PM, Marek Vasut wrote: >>> Dear Gerlando Falauto, >>> >>>> Changes in the syntax (user API) for "env default": >>>> -f: override write-once variables >>>> -a: all (resetting the whole env is NOT the default behavior) >>>> >>>> Signed-off-by: Gerlando Falauto >>> >>> I have to admit I'm not much of a fan of how you use this apply() >>> callback, is it really necessary? >> >> See my previous email. >> >>> Also, do we need special command for default env? >> >> I am sorry, I don't get the question. What do you mean? >> It's always the same "env import" with an augmented command line. >> If you're referring to CONFIG_CMD_DEFAULTENV_VARS, I don't think it's >> neeed either, but it was requested at some previous time. > > Hmm. > >> I also think it's misleading to have some syntax for the same command >> conditionally enabled. Has it ever been done before? > > Yes it was, but this is creepy -- is this command displaying the compiled-in set > of env vars? Nope, "env default" will reset the environment to the default. I just made it selective, so that you can specify a subset of variables to be restored to default. I also changed the meaning of "-f", which used to mean "all", and now means "force", and added "-a" which now means "all". Thank you, Gerlando