[PATCH] env: Add more context to error message

Sascha Hauer s.hauer at pengutronix.de
Wed Feb 7 23:58:33 PST 2018


When setenv complains that it can't set a device parameter, then print
which parameter it tried to set.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 common/env.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/env.c b/common/env.c
index 80d3f7ab50..323a82223e 100644
--- a/common/env.c
+++ b/common/env.c
@@ -266,7 +266,7 @@ int setenv(const char *_name, const char *value)
 	if (strchr(name, '.')) {
 		ret = dev_setenv(name, value);
 		if (ret)
-			eprintf("Cannot set parameter: %s\n", strerror(-ret));
+			eprintf("Cannot set parameter %s: %s\n", name, strerror(-ret));
 		goto out;
 	}
 
-- 
2.15.1




More information about the barebox mailing list