diff options
| author | Mikhail Kshevetskiy <[email protected]> | 2024-06-27 14:29:04 +0300 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-07-10 13:36:14 -0600 |
| commit | 72e77ab1c9ef744a9d25e25f151db2c99ffbb95d (patch) | |
| tree | 0a01e53a3b3bdbae6493a6db7fd6ee93f51752ae /cmd/gpt.c | |
| parent | 475aa8345a78396d39b42f96eccecd37ebe24e99 (diff) | |
gpt: allow spaces in partition list
This allows spliting partition list to several lines in environment file
ex:
--------------------
gpt_partition_list=
name=boot1,size=5MiB,start=0x100000;
name=boot2,size=5MiB;
name=rootfs1,size=70MiB;
name=rootfs2,size=70MiB;
name=overlay1,size=20MiB;
name=overlay2,size=20MiB;
name=art,size=4MiB;
Signed-off-by: Mikhail Kshevetskiy <[email protected]>
Reviewed-by: Sam Protsenko <[email protected]>
Tested-by: Sam Protsenko <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Diffstat (limited to 'cmd/gpt.c')
| -rw-r--r-- | cmd/gpt.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd/gpt.c b/cmd/gpt.c index aeabd19dd76..86b7701886a 100644 --- a/cmd/gpt.c +++ b/cmd/gpt.c @@ -116,6 +116,7 @@ static char *extract_val(const char *str, const char *key) k = strsep(&v, "="); if (!k) break; + k += strspn(k, " \t"); if (strcmp(k, key) == 0) { new = strdup(v); break; @@ -150,6 +151,7 @@ static bool found_key(const char *str, const char *key) k = strsep(&s, ","); if (!k) break; + k += strspn(k, " \t"); if (strcmp(k, key) == 0) { result = true; break; |
