[U-Boot] [PATCH] cmd_nvedit.c: make error message more helpful

Wolfgang Denk wd at denx.de
Thu May 12 19:47:27 CEST 2011


Dear Wolfgang Denk,

In message <1304540989-10450-1-git-send-email-wd at denx.de> you wrote:
> When calling getenv_f() with a too small buffer, it would print an
> error message like this:
> 
> 	env_buf too small [32]
> 
> This is not really helpful as it does not give any indication which of
> the calls might have failed.  Change this into:
> 
> 	env_buf [32 bytes] too small for value of "hwconfig"
> 
> so we know at least which variable caused the overflow; this usually
> allows to quickly find the related code as well.
> 
> Signed-off-by: Wolfgang Denk <wd at denx.de>
> ---
>  common/cmd_nvedit.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)

Applied, 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: wd at denx.de
"The X11 source code style is ATROCIOUS and should not be used  as  a
model."                                                   - Doug Gwyn


More information about the U-Boot mailing list