Re: [U-Boot] [PATCH 21/30] common/hush: make get_local_var visible for other users
Dear Heiko Schocher, In message <4dbe3fe6.8010...@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 -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de "The best index to a person's character is a) how he treats people who can't do him any good and b) how he treats people who can't fight back."- Abigail Van Buren ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 21/30] common/hush: make get_local_var visible for other users
Hello Wolfgang, Wolfgang Denk wrote: > Dear Valentin Longchamp, > > In message > > you wrote: >> From: Holger Brunck >> >> Signed-off-by: Holger Brunck >> Acked-by: Heiko Schocher >> cc: Wolfgang Denk >> cc: Detlev Zundel >> cc: Valentin Longchamp >> Signed-off-by: Valentin Longchamp > > 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 -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 21/30] common/hush: make get_local_var visible for other users
Dear Valentin Longchamp, In message you wrote: > From: Holger Brunck > > Signed-off-by: Holger Brunck > Acked-by: Heiko Schocher > cc: Wolfgang Denk > cc: Detlev Zundel > cc: Valentin Longchamp > Signed-off-by: Valentin Longchamp What is the rationale for this change? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de When a man sits with a pretty girl for an hour, it seems like a minute. But let him sit on a hot stove for a minute -- and it's lon- ger than any hour. That's relativity. -- Albert Einstein ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 21/30] common/hush: make get_local_var visible for other users
From: Holger Brunck Signed-off-by: Holger Brunck Acked-by: Heiko Schocher cc: Wolfgang Denk cc: Detlev Zundel cc: Valentin Longchamp Signed-off-by: Valentin Longchamp --- common/hush.c |3 +-- include/hush.h |1 + 2 files changed, 2 insertions(+), 2 deletions(-) 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); -- 1.7.0.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot