[PATCH V2 1/7] env: Warn on force access if ENV_ACCESS_IGNORE_FORCE set

Simon Goldschmidt
2020-10-23T10:04:48Z

Am 23.10.2020 um 11:52 schrieb Marek Vasut:
> On 10/23/20 10:58 AM, Simon Goldschmidt wrote:
>> Am 31.07.2020 um 23:40 schrieb Tom Rini:
>>> On Tue, Jul 07, 2020 at 08:51:33PM +0200, Marek Vasut wrote:
>>>
>>>> If the ENV_ACCESS_IGNORE_FORCE is set, inform user that the variable
>>>> cannot be force-set if such attempt happens.
>>>>
>>>> Signed-off-by: Marek Vasut <marex@denx.de>
>>>> Reviewed-by: Tom Rini <trini@konsulko.com>
>>>
>>> Applied to u-boot/master, thanks!
>>>
>>
>> Sorry I haven't followed this and wasn't able to report this earlier,
>> but I think this is wrong: This warning is issued when 0 is returned,
>> which means the change is accepted, not rejected.
>
> I think there was a subsequent discussion on this topic in the ML,
> [PATCH] Revert "env: Warn on force access if ENV_ACCESS_IGNORE_FORCE
> set", I think we reached a conclusion this patch was OK. But if you did
> more digging and found a problem, please send a patch / provide details.
>

I use a script that reads ethaddrs from external storage and then use
"env set -f ethaddr <addr>". With v2020.10, I now get a warning that
this can't be written, but I still see the value later with 'env print'.

I think this should just be reverted. I'll try to find the thread
discussing the revert patch you mentioned.

Regards,
Simon