rockchip: part: rkpram: update size for the last partition

The last partition with size '-' use all remain size.

Change-Id: Id91302d89927ac01c1975c8798c59543314689cd
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
This commit is contained in:
Kever Yang 2018-06-11 10:14:20 +08:00
parent e0023032d6
commit f91f3b3427
1 changed files with 3 additions and 0 deletions

View File

@ -83,6 +83,9 @@ static int rkparm_param_parse(char *param, struct list_head *parts_head,
if (dev_desc->if_type != IF_TYPE_RKNAND)
offset = RK_PARAM_OFFSET;
part->start = start + offset;
/* Last partition use all remain space */
if (size == (~0UL))
size = dev_desc->lba - part->start;
part->size = size;
strncpy(part->name, next, len);
part->name[len] = '\0';