From b64b7c3df7906342ca8abe8ae31c0c12ced3f401 Mon Sep 17 00:00:00 2001 From: Gerlando Falauto Date: Fri, 24 Aug 2012 00:11:41 +0000 Subject: env: make "env default" selective, check and apply Change the syntax (user API) for "env default": -f: override write-once variables var... : accept individual variable(s) -a: all (resetting the whole env is NOT the default behavior) Enable variable checking and make changes effective by enabling do_apply argument to himport_r(). Signed-off-by: Gerlando Falauto --- include/environment.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/environment.h') diff --git a/include/environment.h b/include/environment.h index 90fb1302b..e8ab7033b 100644 --- a/include/environment.h +++ b/include/environment.h @@ -181,6 +181,9 @@ void env_crc_update(void); /* [re]set to the default environment */ void set_default_env(const char *s); +/* [re]set individual variables to their value in the default environment */ +int set_default_vars(int nvars, char * const vars[]); + /* Import from binary representation into hash table */ int env_import(const char *buf, int check); -- cgit v1.2.3-70-g09d2