public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Alexander Holler <holler@ahsoftware.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] U-Boot 2010.12 Cannot Successfully Save Variables with Redundant NAND Environment
Date: Mon, 07 Feb 2011 11:28:53 +0100	[thread overview]
Message-ID: <4D4FC965.7040306@ahsoftware.de> (raw)
In-Reply-To: <C97453BC.23E58%gerickson@nuovations.com>

Am 06.02.2011 22:33, schrieb Grant Erickson:

>      // Preincrement random data.
>
>      ++env_new.flags; /* increase the serial */
>
> Unfortunately, preincrementing random data won't replicate the behavior of

Wheter using preincrement or postinecrement isn't of interest here, 
using preincrement is just a good habit which will avoid temporaries 
when incrementing complex types in c++. Using always postincrement is a 
bad habit. Just let us call that increment. ;)

But for the random it looks like you are true and I haven't had examined 
the code correctly. I had the believe (and examine the newly saved nand 
here showed that too), that env_new.flags contains the old serial. Must 
have been luck that I've had always the old serial there.

Anyway, increasing the serial there is the right way, it's just that 
flags should already contain the old serial.

> 2010.09, where the flags field was referenced through a global env_ptr such
> that flag manipulation was handled (more) coherently as the environment was
> read and written.

Sorry, I don't know how that worked before. I never have come in touch 
with that before.

Regards,

Alexander

      reply	other threads:[~2011-02-07 10:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-06 20:41 [U-Boot] U-Boot 2010.12 Cannot Successfully Save Variables with Redundant NAND Environment Grant Erickson
2011-02-06 21:19 ` Wolfgang Denk
2011-02-06 21:33 ` Grant Erickson
2011-02-07 10:28   ` Alexander Holler [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D4FC965.7040306@ahsoftware.de \
    --to=holler@ahsoftware.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox