[PATCH v2] ubiformat: make it work on mtd parts > 2GiB
Artem Bityutskiy
dedekind at infradead.org
Wed Feb 11 02:30:17 EST 2009
On Tue, 2009-02-10 at 11:33 +0100, Sebastian Andrzej Siewior wrote:
> diff --git a/ubi-utils/new-utils/src/libmtd.c b/ubi-utils/new-utils/src/libmtd.c
> index aab4b0e..69705dd 100644
> --- a/ubi-utils/new-utils/src/libmtd.c
> +++ b/ubi-utils/new-utils/src/libmtd.c
> @@ -189,7 +189,7 @@ int mtd_is_bad(const struct mtd_info *mtd, int eb)
> if (!mtd->allows_bb)
> return 0;
>
> - seek = eb * mtd->eb_size;
> + seek = (unsigned int)eb * mtd->eb_size;
I believe this should be:
seek = (off_t)eb * mtd->eb_size;
instead.
--
Best regards,
Artem Bityutskiy (Битюцкий Артём)
More information about the linux-mtd
mailing list