public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v0 0/4] env: reworking + default/import individual vars
@ 2011-10-26 16:37 Gerlando Falauto
  2011-10-26 16:37 ` [U-Boot] [PATCH v0 1/4] Groundwork for generalization of env interface Gerlando Falauto
                   ` (6 more replies)
  0 siblings, 7 replies; 45+ messages in thread
From: Gerlando Falauto @ 2011-10-26 16:37 UTC (permalink / raw)
  To: u-boot

This is a resubmission (after removing remove checkpatch errors) of
http://lists.denx.de/pipermail/u-boot/2011-September/102875.html

Here I am proposing a set of changes in the behaviour of the environment 
import/set_to_default functions.

PATCH 1:
Add a "new" himport_ex() function (reworking of himport_r which is now a 
wrapper around it), which has 3 new arguments:

"nvars", "vars":, number and list of variables to take into account 
(0 means ALL)

"apply" callback function which is in charge of checking whether a 
variable can be overwritten, and possibly immediately apply the changes. 
This parameter would be either set to NULL (in which case nothing should 
change wrt to the past -- i.e. environment is blindly imported) or to 
"env_check_apply()" function, whose code was taken away from _do_env_set().
This would be useful, for instance, for "baudrate" or "stdin,stderr,stdout", 
whose changes would not otherwise be effective until the next reboot.

The idea is that there should be a single place where all the checks are
to be performed. So the same function env_check_apply() is called from 
_do_env_set() as well (thus keeping the previous behavior).

PATCH 2:
Add the same behaviour when deleting variables.
Not quite sure whether this makes sense or not.

PATCH 3:
Add the code for setting individual variables to default

PATCH 4:
Impolement importing of  individual variables
(also taking into account "-f" for forcing).

Gerlando Falauto (4):
  Groundwork for generalization of env interface
  env: check and apply changes on delete/destroy
  env: implement selective "env default"
  env: implement "env import -n var[,var...]"

 README                   |    2 +
 common/cmd_nvedit.c      |  231 ++++++++++++++++++++++++++++++++--------------
 common/env_common.c      |   29 ++++++-
 include/config_cmd_all.h |    1 +
 include/environment.h    |   12 +++
 include/search.h         |   19 ++++-
 lib/hashtable.c          |   68 ++++++++++++-
 7 files changed, 284 insertions(+), 78 deletions(-)

^ permalink raw reply	[flat|nested] 45+ messages in thread

end of thread, other threads:[~2013-03-24  9:41 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-26 16:37 [U-Boot] [PATCH v0 0/4] env: reworking + default/import individual vars Gerlando Falauto
2011-10-26 16:37 ` [U-Boot] [PATCH v0 1/4] Groundwork for generalization of env interface Gerlando Falauto
2011-11-05 16:09   ` Wolfgang Denk
2011-11-07 21:06     ` Gerlando Falauto
2011-11-07 22:05       ` Wolfgang Denk
2011-11-07 23:02         ` [U-Boot] Continuation line alignment Scott Wood
2011-11-07 23:32           ` Gerlando Falauto
2011-11-07 23:44             ` Scott Wood
2011-11-07 23:58             ` Scott Wood
2011-11-08 10:20               ` Gerlando Falauto
2011-11-07 23:05         ` [U-Boot] [PATCH v0 1/4] Groundwork for generalization of env interface Gerlando Falauto
2011-11-07 23:30           ` Wolfgang Denk
2011-11-05 16:34   ` Wolfgang Denk
2011-10-26 16:37 ` [U-Boot] [PATCH v0 2/4] env: check and apply changes on delete/destroy Gerlando Falauto
2011-11-05 16:13   ` Wolfgang Denk
2011-10-26 16:37 ` [U-Boot] [PATCH v0 3/4] env: implement selective "env default" Gerlando Falauto
2011-11-05 16:40   ` Wolfgang Denk
2011-10-26 16:37 ` [U-Boot] [PATCH v0 4/4] env: implement "env import -n var[, var...]" Gerlando Falauto
2011-11-06 19:52 ` [U-Boot] [PATCH] env: fix "env ask" command Wolfgang Denk
2011-11-06 19:55   ` [U-Boot] [PATCH 1/2] Add SLRE - Super Light Regular Expression library Wolfgang Denk
2011-11-06 19:55     ` [U-Boot] [PATCH 2/2] env: add regex support for environment variables Wolfgang Denk
2011-11-07 11:07       ` Detlev Zundel
2013-03-22 21:44     ` [U-Boot] [PATCH 0/9] Add Regular Expressions Support Wolfgang Denk
2013-03-22 21:44       ` [U-Boot] [PATCH 1/9] hashtable: preparations to use hexport_r() for "env grep" Wolfgang Denk
2013-03-22 21:44       ` [U-Boot] [PATCH 2/9] "env grep" - reimplement command using hexport_r() Wolfgang Denk
2013-03-22 21:44       ` [U-Boot] [PATCH 3/9] "env grep" - add options to grep in name, value, or both Wolfgang Denk
2013-03-22 21:44       ` [U-Boot] [PATCH 4/9] Add SLRE - Super Light Regular Expression library Wolfgang Denk
2013-03-22 21:44       ` [U-Boot] [PATCH 5/9] "env grep" - add support for regular expression matches Wolfgang Denk
2013-03-22 21:44       ` [U-Boot] [PATCH 6/9] setexpr: simplify code, improve help message Wolfgang Denk
2013-03-22 21:44       ` [U-Boot] [PATCH 7/9] setexpr: add regex substring matching and substitution Wolfgang Denk
2013-03-22 22:36         ` Marek Vasut
2013-03-24  9:38           ` Wolfgang Denk
2013-03-22 21:44       ` [U-Boot] [PATCH 8/9] m28evk: enable "env grep" and regexp support Wolfgang Denk
2013-03-22 21:44       ` [U-Boot] [PATCH 9/9] amcc-common.h: enable support for "env grep", "setexpr", and regex Wolfgang Denk
2013-03-22 21:50       ` [U-Boot] [PATCH 0/9] Add Regular Expressions Support Wolfgang Denk
2013-03-23 12:18       ` Otavio Salvador
2013-03-24  9:41         ` Wolfgang Denk
2013-02-20 14:53   ` [U-Boot] [PATCH] env: fix "env ask" command Wolfgang Denk
2011-11-06 19:57 ` [U-Boot] [PATCH v0 0/4] env: reworking + default/import individual vars Wolfgang Denk
2011-11-06 22:15 ` Wolfgang Denk
2011-11-08  9:33   ` Gerlando Falauto
2011-11-08 11:46     ` Wolfgang Denk
2011-11-08 12:04       ` Gerlando Falauto
2011-11-08 12:47         ` Wolfgang Denk
2011-11-08 13:33           ` Holger Brunck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox