[U-Boot] [PATCH v2 3/3] env: make "env default" selective, check and apply

Gerlando Falauto
2012-03-30T13:25:17Z

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<gerlando.falauto@keymile.com>
>>>
>>> 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