[PATCH] mtd: cmdlinepart: fix the wrong partitions number when truncating occurs

Huang Shijie shijie8 at gmail.com
Fri Aug 24 12:22:51 EDT 2012


On Fri, Aug 24, 2012 at 11:43 AM, Artem Bityutskiy <dedekind1 at gmail.com> wrote:
> On Sat, 2012-08-18 at 12:51 -0400, Huang Shijie wrote:
>> diff --git a/drivers/mtd/cmdlinepart.c b/drivers/mtd/cmdlinepart.c
>> index 4558e0f..fc960a3 100644
>> --- a/drivers/mtd/cmdlinepart.c
>> +++ b/drivers/mtd/cmdlinepart.c
>> @@ -344,7 +344,8 @@ static int parse_cmdline_partitions(struct mtd_info *master,
>>                                              "%s: partitioning exceeds flash size, truncating\n",
>>                                              part->mtd_id);
>>                                       part->parts[i].size = master->size - offset;
>> -                                     part->num_parts = i;
>> +                                     part->num_parts = i + 1;
>> +                                     break;
>>                               }
>>                               offset += part->parts[i].size;
>>                       }
>
> I do not understand this change. Could you explain some more which
> problem you solve and how?
ok.

I will explain more in the next version as well as another patch.

thanks
Huang Shijie

>
> --
> Best Regards,
> Artem Bityutskiy



More information about the linux-mtd mailing list