diff options
| author | Tom Rini <[email protected]> | 2020-12-07 17:16:23 -0500 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2020-12-07 17:16:23 -0500 |
| commit | cd833de0593fa2346dddab21eff6ccf2411380d3 (patch) | |
| tree | f87835b392c62414199e5fb926d0f4f63d92ec9e /cmd | |
| parent | 5157ea526142ace7b0b19939b0d31ace4276cda7 (diff) | |
| parent | 51bb33846ad2b045799d2c43ca773fafa36e6ec8 (diff) | |
Merge branch '2020-12-07-bootm-and-spl-atf-improvements' into next
- Series to improve "bootm" by allowing variable evaluation within the
cmdline we would be passing. This will help with Chrome OS but can be
useful elsewhere.
- Improve ATF (TF-A) support within SPL.
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/nvedit.c | 6 | ||||
| -rw-r--r-- | cmd/pxe_utils.c | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/cmd/nvedit.c b/cmd/nvedit.c index 7fce723800d..d0d2eca9047 100644 --- a/cmd/nvedit.c +++ b/cmd/nvedit.c @@ -266,7 +266,9 @@ static int _do_env_set(int flag, int argc, char *const argv[], int env_flag) /* Delete only ? */ if (argc < 3 || argv[2] == NULL) { int rc = hdelete_r(name, &env_htab, env_flag); - return !rc; + + /* If the variable didn't exist, don't report an error */ + return rc && rc != -ENOENT ? 1 : 0; } /* @@ -895,7 +897,7 @@ static int do_env_delete(struct cmd_tbl *cmdtp, int flag, while (--argc > 0) { char *name = *++argv; - if (!hdelete_r(name, &env_htab, env_flag)) + if (hdelete_r(name, &env_htab, env_flag)) ret = 1; } diff --git a/cmd/pxe_utils.c b/cmd/pxe_utils.c index 235522f4bbc..b9d9a5786c2 100644 --- a/cmd/pxe_utils.c +++ b/cmd/pxe_utils.c @@ -322,7 +322,8 @@ static int label_localboot(struct pxe_label *label) if (label->append) { char bootargs[CONFIG_SYS_CBSIZE]; - cli_simple_process_macros(label->append, bootargs); + cli_simple_process_macros(label->append, bootargs, + sizeof(bootargs)); env_set("bootargs", bootargs); } @@ -430,7 +431,8 @@ static int label_boot(struct cmd_tbl *cmdtp, struct pxe_label *label) strcat(bootargs, ip_str); strcat(bootargs, mac_str); - cli_simple_process_macros(bootargs, finalbootargs); + cli_simple_process_macros(bootargs, finalbootargs, + sizeof(finalbootargs)); env_set("bootargs", finalbootargs); printf("append: %s\n", finalbootargs); } |
