[U-Boot] [PATCH] fw_printenv: Don't bail out directly after one env read error
Wolfgang Denk
wd at denx.de
Fri Jun 29 10:53:59 UTC 2018
Dear Adrian,
In message <20180626093759.24018-1-adrian.ratiu at ni.com> you wrote:
> From: Joe Hershberger <joe.hershberger at ni.com>
>
> When using a redundant environment a read error should simply mean to
> not use that copy instead of giving up completely. The other copy may
> be just fine.
While the general idea is fine, I think we should NOT automatically
read data from the backup copy, at least not without clearly letting
the user know about this - and such notification should also work in
automated scripts or cod calling these routines, so a plain warning
message is NOT sufficient.
I suggest that the default remains as is: environment read errors
cause an error return of this function.
But it would probably nice for recovery purposes or such to add an
option to switch into some "permissive" mode - here the fall-back to
the redundant copy would be permitted, and the return code should
indicate what happened (read of primary env copy OK; read failed,
but redundant copy could ne read; all read attemtps failed).
Thanks!
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
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
"When anyone says `theoretically,' they really mean `not really.'"
- David Parnas
More information about the U-Boot
mailing list