Skip to content
Snippets Groups Projects
Commit f59f07ec authored by Ladislav Michl's avatar Ladislav Michl Committed by Heiko Schocher
Browse files

cmd: ubi: allow '-' to specify maximum volume size


Currently maximum volume size can be specified only if no other
arguments are used. Use '-' placeholder as volume size to allow
maximum volume size to be specified together with volume id and
type.

Signed-off-by: default avatarLadislav Michl <ladis@linux-mips.org>
parent 79a34b71
No related branches found
No related tags found
No related merge requests found
......@@ -600,7 +600,8 @@ static int do_ubi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
}
/* E.g., create volume size */
if (argc == 4) {
size = simple_strtoull(argv[3], NULL, 16);
if (argv[3][0] != '-')
size = simple_strtoull(argv[3], NULL, 16);
argc--;
}
/* Use maximum available size */
......@@ -691,8 +692,9 @@ U_BOOT_CMD(
" - Display volume and ubi layout information\n"
"ubi check volumename"
" - check if volumename exists\n"
"ubi create[vol] volume [size] [type] [id]"
" - create volume name with size\n"
"ubi create[vol] volume [size] [type] [id]\n"
" - create volume name with size ('-' for maximum"
" available size)\n"
"ubi write[vol] address volume size"
" - Write volume from address with size\n"
"ubi write.part address volume size [fullsize]\n"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment