From: Peter Korsgaard <jacmet@sunsite.dk>
To: linux-mtd@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] mtd/redboot: Handle holes in fis table
Date: Mon, 20 Mar 2006 20:53:38 +0100 [thread overview]
Message-ID: <87hd5slwot.fsf@48ers.dk> (raw)
Hi,
Redboot simply sets the first character of a fis entry to 0xff on
"fis delete". The kernel redboot parser stops parsing on such an
entry, and without this patch any entries after a deleted image would
not be detected.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
--
drivers/mtd/redboot.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
Index: linux/drivers/mtd/redboot.c
===================================================================
--- linux.orig/drivers/mtd/redboot.c 2006-03-20 15:54:37.000000000 +0100
+++ linux/drivers/mtd/redboot.c 2006-03-20 16:00:06.000000000 +0100
@@ -85,10 +85,6 @@
numslots = (master->erasesize / sizeof(struct fis_image_desc));
for (i = 0; i < numslots; i++) {
- if (buf[i].name[0] == 0xff) {
- i = numslots;
- break;
- }
if (!memcmp(buf[i].name, "FIS directory", 14)) {
/* This is apparently the FIS directory entry for the
* FIS directory itself. The FIS directory size is
@@ -128,7 +124,7 @@
struct fis_list *new_fl, **prev;
if (buf[i].name[0] == 0xff)
- break;
+ continue;
if (!redboot_checksum(&buf[i]))
break;
--
Bye, Peter Korsgaard
reply other threads:[~2006-03-20 19:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=87hd5slwot.fsf@48ers.dk \
--to=jacmet@sunsite.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.