On Thu, Nov 23, 2017 at 09:46:36PM +0100, Jan Kiszka wrote: > On 2017-11-22 12:59, Andreas J. Reichel wrote: > > From: Andreas Reichel <[email protected]> > > > > If in_progress is set in the latest environment, do not boot from it, as > > a current update process may have been interrupted and this environment > > is currently used by software update. Instead, boot from the 2nd latest > > revision. > > > > Signed-off-by: Andreas Reichel <[email protected]> > > --- > > env/fatvars.c | 6 +++++- > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > diff --git a/env/fatvars.c b/env/fatvars.c > > index 5d391c7..2c84700 100644 > > --- a/env/fatvars.c > > +++ b/env/fatvars.c > > @@ -191,8 +191,12 @@ BG_STATUS load_config(BG_LOADER_PARAMS *bglp) > > /* Assume we boot with the latest configuration */ > > current_partition = latest_idx; > > > > + /* Test if this environment is currently 'in_progress'. If yes, > > + * do not boot from it, instead ignore it */ > > + if (env[latest_idx].in_progress == 1) { > > + current_partition = pre_latest_idx; > > + } else if (env[latest_idx].ustate == USTATE_TESTING) { > > /* Test if this configuration is in test mode */ > > Comment is now misplaced. But, actually it already was of the kind "set > i to 1" before, so just kill it. Killed :) > > > - if (env[latest_idx].ustate == USTATE_TESTING) { > > /* If it has already been booted, this indicates a failed > > * update. In this case, mark it as failed by giving a > > * zero-revision */ > > > > Jan > > -- > Siemens AG, Corporate Technology, CT RDA ITP SES-DE > Corporate Competence Center Embedded Linux
-- Andreas Reichel Dipl.-Phys. (Univ.) Software Consultant [email protected], +49-174-3180074 TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterfoehring Geschaeftsfuehrer: Henrik Klagges, Dr. Robert Dahlke, Gerhard Mueller Sitz: Unterfoehring * Amtsgericht Muenchen * HRB 135082 -- You received this message because you are subscribed to the Google Groups "EFI Boot Guard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/efibootguard-dev/20171127120729.GB31085%40iiotirae. For more options, visit https://groups.google.com/d/optout.
