disk: rkparm: use env_update_filter() to append cmdline

Change-Id: I4b5024adc4b2d176f1ffa25677323ba17a1d061f
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
This commit is contained in:
Joseph Chen 2018-07-04 17:09:35 +08:00 committed by Jianhong Chen
parent feff4979f6
commit 8f0cd0fbde
1 changed files with 4 additions and 6 deletions

View File

@ -48,14 +48,12 @@ static int rkparm_param_parse(char *param, struct list_head *parts_head,
next = strchr(blkdev_parts, ':');
cmdline_end = strstr(cmdline, "\n"); /* end by '\n' */
*cmdline_end = '\0';
/* skip "CMDLINE:" */
env_update("bootargs", cmdline + strlen("CMDLINE:"));
/*
* Initrd fixup: remove unused "initrd=0x...,0x...", this for
* 1. skip "CMDLINE:"
* 2. Initrd fixup: remove unused "initrd=0x...,0x...", this for
* compatible with legacy parameter.txt
*/
env_delete("bootargs", "initrd=");
env_update_filter("bootargs", cmdline + strlen("CMDLINE:"), "initrd=");
INIT_LIST_HEAD(parts_head);
while (next) {