From f91f3b34274f35e9ce4952b54088eb46b93497da Mon Sep 17 00:00:00 2001 From: Kever Yang Date: Mon, 11 Jun 2018 10:14:20 +0800 Subject: [PATCH] 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 --- disk/part_rkparm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/disk/part_rkparm.c b/disk/part_rkparm.c index 38bc2e112b..4dd2d564d7 100644 --- a/disk/part_rkparm.c +++ b/disk/part_rkparm.c @@ -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';