[PATCH] common: env: make error message more verbose

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Change the setenv error message from

	set parameter: Invalid argument

to a more helpful

	net: cannot set parameter 'nameserver': Invalid argument

Signed-off-by: Steffen Trumtrar <s.trumtrar@xxxxxxxxxxxxxx>
---
 common/env.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/common/env.c b/common/env.c
index 2e33eb35856b..434170a7468b 100644
--- a/common/env.c
+++ b/common/env.c
@@ -225,8 +225,10 @@ int setenv(const char *_name, const char *value)
 
 		errno = -ret;
 
-		if (ret < 0)
-			perror("set parameter");
+		if (ret < 0) {
+			dev_err(dev, "cannot set parameter '%s'", par);
+			perror("");
+		}
 
 		goto out;
 	}
-- 
2.1.4


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux