Skip to content

Commit

Permalink
[PATCH] mtd/redboot: Handle holes in fis table
Browse files Browse the repository at this point in the history
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>
Cc: Thomas Gleixner <tglx@linutronix.de>
Acked-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Peter Korsgaard authored and Linus Torvalds committed Mar 31, 2006
1 parent a63ec1b commit 84e699e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/mtd/redboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,6 @@ static int parse_redboot_partitions(struct mtd_info *master,

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
Expand Down Expand Up @@ -128,7 +124,7 @@ static int parse_redboot_partitions(struct mtd_info *master,
struct fis_list *new_fl, **prev;

if (buf[i].name[0] == 0xff)
break;
continue;
if (!redboot_checksum(&buf[i]))
break;

Expand Down

0 comments on commit 84e699e

Please sign in to comment.