[U-Boot] [PATCH v2 2/3] env: check and apply changes on delete/destroy

Simon Glass
2011-12-07T22:02:23Z

Hi Gerlando,

On Wed, Dec 7, 2011 at 5:30 AM, Gerlando Falauto
<gerlando.falauto@keymile.com> wrote:
> Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>

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

> ---
> ?common/cmd_nvedit.c | ? ?2 +-
> ?include/search.h ? ?| ? ?6 ++++--
> ?lib/hashtable.c ? ? | ? 18 ++++++++++++------
> ?3 files changed, 17 insertions(+), 9 deletions(-)
>

> diff --git a/include/search.h b/include/search.h
> index 2a59e03..7ad4261 100644
> --- a/include/search.h
> +++ b/include/search.h
> @@ -142,7 +142,8 @@ int hcreate_r(size_t nel, struct hsearch_data *htab)
> ?* be freed and the local static variable can be marked as not used.
> ?*/
>
> -void hdestroy_r(struct hsearch_data *htab)
> +void hdestroy_r(struct hsearch_data *htab,
> + ? ? ? ? ? ? ? int(*apply)(const char *, const char *, const char *, int))\

You could just use 'apply_cb apply' for that param I think.

> ?{
> ? ? ? ?int i;
>

Regards,
Simon