Message ID | bcd3f91d4c8a00436c4eafa44b9cc3fa77e09063.1302272395.git.valentin.longchamp@keymile.com |
---|---|
State | Superseded |
Headers | show |
Dear Valentin Longchamp, In message <bcd3f91d4c8a00436c4eafa44b9cc3fa77e09063.1302272395.git.valentin.longchamp@keymile.com> you wrote: > From: Holger Brunck <holger.brunck@keymile.com> > > Signed-off-by: Holger Brunck <holger.brunck@keymile.com> > Acked-by: Heiko Schocher <hs@denx.de> > cc: Wolfgang Denk <wd@denx.de> > cc: Detlev Zundel <dzu@denx.de> > cc: Valentin Longchamp <valentin.longchamp@keymile.com> > Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com> What is the rationale for this change? Best regards, Wolfgang Denk
Hello Wolfgang, Wolfgang Denk wrote: > Dear Valentin Longchamp, > > In message <bcd3f91d4c8a00436c4eafa44b9cc3fa77e09063.1302272395.git.valentin.longchamp@keymile.com> you wrote: >> From: Holger Brunck <holger.brunck@keymile.com> >> >> Signed-off-by: Holger Brunck <holger.brunck@keymile.com> >> Acked-by: Heiko Schocher <hs@denx.de> >> cc: Wolfgang Denk <wd@denx.de> >> cc: Detlev Zundel <dzu@denx.de> >> cc: Valentin Longchamp <valentin.longchamp@keymile.com> >> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com> > > What is the rationale for this change? We can actually only set from c-code local hush shell variables, with this patch we can also read them from c-code. bye, Heiko
Dear Heiko Schocher, In message <4DBE3FE6.8010009@denx.de> you wrote: > > > What is the rationale for this change? > > We can actually only set from c-code local hush shell variables, > with this patch we can also read them from c-code. I see, thanks. Best regards, Wolfgang Denk
diff --git a/common/hush.c b/common/hush.c index 8021a68..85a6030 100644 --- a/common/hush.c +++ b/common/hush.c @@ -497,7 +497,6 @@ static void remove_bg_job(struct pipe *pi); /* local variable support */ static char **make_list_in(char **inp, char *name); static char *insert_var_value(char *inp); -static char *get_local_var(const char *var); #ifndef __U_BOOT__ /* Table of built-in functions. They can be forked or not, depending on @@ -2169,7 +2168,7 @@ static char *get_dollar_var(char ch); #endif /* This is used to get/check local shell variables */ -static char *get_local_var(const char *s) +char *get_local_var(const char *s) { struct variables *cur; diff --git a/include/hush.h b/include/hush.h index 0805ff3..5c566cc 100644 --- a/include/hush.h +++ b/include/hush.h @@ -34,6 +34,7 @@ extern int parse_file_outer(void); int set_local_var(const char *s, int flg_export); void unset_local_var(const char *name); +char *get_local_var(const char *s); #if defined(CONFIG_HUSH_INIT_VAR) extern int hush_init_var (void);