From: Wolfgang Denk Date: Thu, 12 May 2011 19:47:27 +0200 Subject: [U-Boot] [PATCH] cmd_nvedit.c: make error message more helpful In-Reply-To: <1304540989-10450-1-git-send-email-wd@denx.de> References: <1304540989-10450-1-git-send-email-wd@denx.de> Message-ID: <20110512174727.E7CF8D6F24F@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Wolfgang Denk, In message <1304540989-10450-1-git-send-email-wd@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 > --- > 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