提交 a02a884b 编写于 作者: W Wolfgang Denk

cmd_nvedit.c: make error message more helpful

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: NWolfgang Denk <wd@denx.de>
上级 03eb129f
......@@ -532,7 +532,8 @@ int getenv_f(char *name, char *buf, unsigned len)
if (n)
*--buf = '\0';
printf("env_buf too small [%d]\n", len);
printf("env_buf [%d bytes] too small for value of \"%s\"\n",
len, name);
return n;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册