public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH]env_nand.c Added bad block management for environment variables
Date: Thu, 29 May 2008 12:32:59 -0500	[thread overview]
Message-ID: <483EE8CB.1060406@freescale.com> (raw)
In-Reply-To: <483EE840.6030002@freescale.com>

Scott Wood wrote:
>> +	size_t end;
>> +	int ret_val = 0;
>> +	end = offset + CFG_ENV_SIZE;
>> +
>> +	for (; offset < end; offset += nand_info[0].erasesize) {
>> +		if (nand_block_isbad(&nand_info[0],offset))
>> +			ret_val = 1;
>> +	}
>> +
>> +	return ret_val;
> 
> size_t end = offset + CFG_ENV_SIZE;
> 
> while (offset < end)
> 	if (nand_block_isbad(&nand_info[0], offset))
> 		return 1;
> 
> return 0;

Err, with an offset increment in the loop, of course.

-Scott

  reply	other threads:[~2008-05-29 17:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-27 14:01 [U-Boot-Users] [PATCH]env_nand.c Added bad block management for environment variables Stuart Wood
2008-05-28 17:57 ` Scott Wood
2008-05-29 17:14   ` Stuart Wood
2008-05-29 17:30     ` Scott Wood
2008-05-29 17:32       ` Scott Wood [this message]
2008-05-30 15:14         ` Stuart Wood
2008-05-30 17:28           ` Scott Wood
2008-05-30 20:05             ` Stuart Wood
2008-06-02 20:03               ` Scott Wood

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=483EE8CB.1060406@freescale.com \
    --to=scottwood@freescale.com \
    --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