[U-Boot] [RFC PATCH v2 3/7] env: Introduce "export" operation and (access flag) restriction

Simon Glass sjg at chromium.org
Sat Nov 19 14:47:32 CET 2016


On 16 November 2016 at 03:29, Bernhard Nortmann
<bernhard.nortmann at web.de> wrote:
> This patch introduces a new "export" environment operation
> (env_op_export) and the corresponding access flag
> ENV_FLAGS_VARACCESS_PREVENT_EXPORT; so that env_flags_validate()
> may now check requests to export specific variables.
>
> In turn, hexport_r() makes uses of this ability to suppress the
> export of variables that are flagged accordingly.
>
> Note that env_flags_validate() and hexport_r() will respect H_FORCE
> and H_PROGRAMMATIC flags, allowing to bypass the export filtering.
> H_PROGRAMMATIC gets used within env_print() to make sure all
> variables are listed. This is necessary because env_print() is
> essentially an "export to text" operation.
>
> Signed-off-by: Bernhard Nortmann <bernhard.nortmann at web.de>
>
> ---
>
> Changes in v2:
> - Removed too narrow (flag & H_FORCE) expression, use "flag" directly
>
>  cmd/nvedit.c        | 3 ++-
>  common/env_flags.c  | 8 +++++++-
>  include/env_flags.h | 3 ++-
>  include/search.h    | 1 +
>  lib/hashtable.c     | 3 +++
>  5 files changed, 15 insertions(+), 3 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list