[U-Boot] [PATCH] jffs2: add sector_size field to part_info structure

Ilya Yanok yanok at emcraft.com
Wed Oct 15 14:35:27 CEST 2008


Hi Wolfgang,

Wolfgang Denk wrote:
>> @@ -359,6 +361,11 @@ static int part_validate_nor(struct mtdids *id, struct part_info *part)
>>  
>>  	end_offset = part->offset + part->size;
>>  	for (i = 0; i < flash->sector_count; i++) {
>> +		if (i) {
>> +			sector_size = flash->start[i] - flash->start[i-1];
>> +			if (part->sector_size < sector_size)
>> +				part->sector_size = sector_size;
>> +		}
>>     
>
> What about the size of the last sector?
>   

Well, you are right, I've lost last sector... I'll fix this.

Regards, Ilya.



More information about the U-Boot mailing list