u-boot/test/env
Simon Glass 96434a76fd env: Allow returning errors from hdelete_r()
At present this function returns 1 on success and 0 on failure. But in
the latter case it provides no indication of what went wrong.

If an attempt is made to delete a non-existent variable, the caller may
want to ignore this error. This happens when setting a non-existent
variable to "", for example.

Update the function to return 0 on success and a useful error code on
failure. Add a function comment too.

Make sure that env_set() does not return an error if it is deleting a
variable that doesn't exist. We could update env_set() to return useful
error numbers also, but that is beyond the scope of this change.

Signed-off-by: Simon Glass <sjg@chromium.org>

wip
2020-12-04 16:09:06 -05:00
..
attr.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
cmd_ut_env.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
hashtable.c env: Allow returning errors from hdelete_r() 2020-12-04 16:09:06 -05:00
Kconfig test: env: Enable env unit tests by default 2019-04-24 07:27:28 -04:00
Makefile hashtable: fix environment variable corruption 2019-02-09 07:50:54 -05:00