forked from len0rd/rockbox
Bugfix. ipodpatcher wasn't correctly deciding when to rearrange the contents of the firmware partition to make space for the bootloader. This bug was only hit when the amount of space required was less than 0x4400 bytes (17KB) - e.g. when upgrading an existing bootloader.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12193 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
7ebb2911b8
commit
33e1515662
1 changed files with 2 additions and 1 deletions
|
|
@ -548,7 +548,8 @@ int add_bootloader(struct ipod_t* ipod, char* filename, int type)
|
|||
/* Check if we have enough space */
|
||||
/* TODO: Check the size of the partition. */
|
||||
if (ipod->nimages > 1) {
|
||||
if ((entryOffset+paddedlength) >= ipod->ipod_directory[1].devOffset) {
|
||||
if ((ipod->ipod_directory[0].devOffset+entryOffset+paddedlength) >=
|
||||
ipod->ipod_directory[1].devOffset) {
|
||||
fprintf(stderr,"[INFO] Moving images to create room for new firmware...\n");
|
||||
delta = ipod->ipod_directory[0].devOffset + entryOffset+paddedlength
|
||||
- ipod->ipod_directory[1].devOffset;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue