From: Tom Rini Date: Fri, 29 Jun 2018 14:15:50 -0400 Subject: [U-Boot] [PATCH] fw_printenv: Don't bail out directly after one env read error In-Reply-To: <20180629105745.EE018240042@gemini.denx.de> References: <20180626093759.24018-1-adrian.ratiu@ni.com> <20180629105745.EE018240042@gemini.denx.de> Message-ID: <20180629181550.GG18596@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Fri, Jun 29, 2018 at 12:57:45PM +0200, Wolfgang Denk wrote: > Dear Joe, > > In message you wrote: > > > > > 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. > > > > > > Signed-off-by: Joe Hershberger > > > Signed-off-by: Ioan-Adrian Ratiu > > > > Hey Tom, can you pull this in? > > NO! Please don't!! > > NAK!! > > This patch can lead to reading incorrect (old, no longer valid) > values without any way for the user to see what is happening. > > This must not be done! I'm not 100% sure, after reading all of the code, if there's a problem. What we indeed do not want to do is be silent in seeing that the first environment location we read from failed. But AFAICT if flash_io returns non-zero we also output something useful to stderr, so it should be visible to the user that something went wrong. The next question is, if half of the redundant environment has failed, is the other half considered valid (so long as the crc passes) or would only the built-in be valid? I would think the other half is the valid one. -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: