All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-Boot, 4/4] env: common: accept flags on reset to default env
Date: Fri, 20 Jul 2018 08:35:18 -0400	[thread overview]
Message-ID: <20180720123518.GH11755@bill-the-cat> (raw)
In-Reply-To: <20180624161657.32632-5-yaniv.levinsky@compulab.co.il>

On Sun, Jun 24, 2018 at 07:16:57PM +0300, Yaniv Levinsky wrote:

> The function set_default_env() sets the hashtable flags for import_r().
> Formally set_default_env() doesn't accept flags from its callers. In
> practice the caller can (un)set the H_INTERACTIVE flag, but it has to be
> done using the first character of the function's string argument. Other
> flags like H_FORCE can't be set by the caller.
> 
> Change the function to accept flags argument. The benefits are:
> 1. The caller will have to explicitly set the H_INTERACTIVE flag,
>    instead of un-setting it using a special char in a string.
> 2. Add the ability to propagate flags from the caller to himport(),
>    especially the H_FORCE flag from do_env_default() in nvedit.c that
>    currently gets ignored for "env default -a -f" commands.
> 3. Flags and messages will not be coupled together. A caller will be
>    able to set flags without passing a string and vice versa.
> 
> Please note:
> The propagation of H_FORCE from do_env_default() does not introduce any
> functional changes, because currently himport_r() is set to destroy the
> old environment regardless if H_FORCE flag is set or not. More changes
> are needed to utilize the propagation of H_FORCE.
> 
> Signed-off-by: Yaniv Levinsky <yaniv.levinsky@compulab.co.il>
> Acked-by: Igor Grinberg <grinberg@compulab.co.il>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180720/dac54b57/attachment.sig>

  reply	other threads:[~2018-07-20 12:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-24 16:16 [U-Boot] [PATCH 0/4] fix propagation of flags from do_env_default() Yaniv Levinsky
2018-06-24 16:16 ` [U-Boot] [PATCH 1/4] cmd: nvedit: rename flags in do_env_default Yaniv Levinsky
2018-07-20 12:35   ` [U-Boot] [U-Boot, " Tom Rini
2018-06-24 16:16 ` [U-Boot] [PATCH 2/4] cmd: nvedit: propagate envflag to set_default_vars Yaniv Levinsky
2018-07-20 12:35   ` [U-Boot] [U-Boot, " Tom Rini
2018-06-24 16:16 ` [U-Boot] [PATCH 3/4] cmd: nvedit: set H_INTERACTIVE in do_env_default Yaniv Levinsky
2018-07-20 12:35   ` [U-Boot] [U-Boot, " Tom Rini
2018-06-24 16:16 ` [U-Boot] [PATCH 4/4] env: common: accept flags on reset to default env Yaniv Levinsky
2018-07-20 12:35   ` Tom Rini [this message]
2018-07-11 15:21 ` [U-Boot] [PATCH 0/4] fix propagation of flags from do_env_default() Yaniv Levinsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180720123518.GH11755@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.