diff options
author | Tom Rini <trini@konsulko.com> | 2020-07-31 17:13:07 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-07-31 17:13:07 +0300 |
commit | a2d051e7b6a8f87add1067d936bb0c805a47b0df (patch) | |
tree | 671af1a640f1fbb27f87a82685d8be9e632ee564 /lib | |
parent | 719f42190d5f0238cb01ef2ffba8af2285f7bc7a (diff) | |
parent | db82015929aeff6b58982a22d61ab8c5b87752f3 (diff) | |
download | u-boot-a2d051e7b6a8f87add1067d936bb0c805a47b0df.tar.xz |
Merge branch '2020-07-31-more-env-updates'
- Fix EFI selftest to not force setting serial# environment (and also
get the U-Boot prompt dynamically).
- Support for append only environment and other related features.
- Improved ext4 environment support
- Fix the case of fw_setenv being used on flash devices that were not
already locked.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/hashtable.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/hashtable.c b/lib/hashtable.c index 7b6781bc35..4a8c50b4b8 100644 --- a/lib/hashtable.c +++ b/lib/hashtable.c @@ -826,6 +826,10 @@ int himport_r(struct hsearch_data *htab, if (nvars) memcpy(localvars, vars, sizeof(vars[0]) * nvars); +#if CONFIG_IS_ENABLED(ENV_APPEND) + flag |= H_NOCLEAR; +#endif + if ((flag & H_NOCLEAR) == 0 && !nvars) { /* Destroy old hash table if one exists */ debug("Destroy Hash Table: %p table = %p\n", htab, @@ -946,9 +950,12 @@ int himport_r(struct hsearch_data *htab, e.data = value; hsearch_r(e, ENV_ENTER, &rv, htab, flag); - if (rv == NULL) +#if !CONFIG_IS_ENABLED(ENV_WRITEABLE_LIST) + if (rv == NULL) { printf("himport_r: can't insert \"%s=%s\" into hash table\n", name, value); + } +#endif debug("INSERT: table %p, filled %d/%d rv %p ==> name=\"%s\" value=\"%s\"\n", htab, htab->filled, htab->size, |