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
..
2020-05-18 21:19:18 -04:00
2020-05-18 21:19:18 -04:00
2011-01-18 23:38:08 +01:00
2019-12-02 18:23:07 -05:00
2019-10-31 07:22:53 -04:00
2010-09-19 19:29:47 +02:00
2020-10-30 10:56:11 -04:00
2020-04-24 10:51:32 -04:00
2020-11-05 14:58:45 +08:00
2012-04-29 14:14:08 +02:00
2019-12-06 16:44:20 -05:00
2020-05-18 21:19:18 -04:00
2020-06-12 13:14:07 -04:00
2020-05-18 21:19:18 -04:00
2020-11-05 14:58:45 +08:00
2020-08-24 14:11:31 -04:00
2020-10-14 11:16:34 -04:00
2020-05-01 11:03:24 -04:00
2020-05-18 21:19:18 -04:00
2020-10-27 21:13:15 +01:00
2020-05-18 18:36:55 -04:00
2019-05-05 08:48:50 -04:00