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

Wolfgang Denk wd at denx.de
Mon Oct 13 10:17:25 CEST 2008


Dear Ilya,

In message <1223877234-720-2-git-send-email-yanok at emcraft.com> you wrote:
> This patch adds sector_size field to part_info structure (used
> by new JFFS2 code).
...
> @@ -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?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
God is real, unless declared integer.


More information about the U-Boot mailing list