mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
[PATCH] mtd/redboot: Handle holes in fis table
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 <[email protected]> Cc: Thomas Gleixner <[email protected]> Acked-by: David Woodhouse <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
a63ec1b7b7
commit
84e699e6ec
1 changed files with 1 additions and 5 deletions
|
|
@ -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
|
||||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue