1
0
Fork 0
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:
Dave Chapman 2007-02-04 13:04:23 +00:00
parent 7ebb2911b8
commit 33e1515662

View file

@ -548,7 +548,8 @@ int add_bootloader(struct ipod_t* ipod, char* filename, int type)
/* Check if we have enough space */ /* Check if we have enough space */
/* TODO: Check the size of the partition. */ /* TODO: Check the size of the partition. */
if (ipod->nimages > 1) { 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"); fprintf(stderr,"[INFO] Moving images to create room for new firmware...\n");
delta = ipod->ipod_directory[0].devOffset + entryOffset+paddedlength delta = ipod->ipod_directory[0].devOffset + entryOffset+paddedlength
- ipod->ipod_directory[1].devOffset; - ipod->ipod_directory[1].devOffset;