ODROID-COMMON: inputToSysNode: Changed error log.
- Changed fopen error log for making easy to debug.
Signed-off-by: Luke Go <sangch.go@gmail.com>
Change-Id: Icf410b3aa0b6c4e732413a811054c585cade727f
Signed-off-by: steve.jeong <jkhpro1003@gmail.com>
diff --git a/wiringPi/wiringPi.c b/wiringPi/wiringPi.c
index 268fe52..b528a3c 100644
--- a/wiringPi/wiringPi.c
+++ b/wiringPi/wiringPi.c
@@ -279,8 +279,9 @@
sprintf(dest, "%s/%s", sysPath, node);
if((fd = fopen(dest, "w")) == NULL) {
- printf("Invalid sysnode path\n");
- return -1;
+ fprintf(stderr, "sys: Unable to open %s: %s\n",
+ dest, strerror (errno));
+ return -errno;
}
fprintf(fd, "%s\n", data);
fclose(fd);