[PATCH v2] ubiformat: make it work on mtd parts > 2GiB
Sebastian Andrzej Siewior
bigeasy at linutronix.de
Wed Feb 11 03:56:02 EST 2009
Artem Bityutskiy wrote:
> 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.
Yes, indeed.
>
Sebastian
More information about the linux-mtd
mailing list