aboutsummaryrefslogtreecommitdiffstats
path: root/plugin_i2c_sensors.c
diff options
context:
space:
mode:
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2004-01-29 05:55:30 +0000
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2004-01-29 05:55:30 +0000
commit34f02389e3006b036d679f1ff1dd997c6f9f9f08 (patch)
tree73ee6a57dda9126dda618309ef9a8785f5ee0c71 /plugin_i2c_sensors.c
parent319c5104780b85b49bd1752031ad8c1875189eaf (diff)
downloadlcd4linux-34f02389e3006b036d679f1ff1dd997c6f9f9f08.tar.gz
[lcd4linux @ 2004-01-29 05:55:30 by reinelt]
check for /sys mounted git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@346 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'plugin_i2c_sensors.c')
-rw-r--r--plugin_i2c_sensors.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/plugin_i2c_sensors.c b/plugin_i2c_sensors.c
index eacf61b..2c673f1 100644
--- a/plugin_i2c_sensors.c
+++ b/plugin_i2c_sensors.c
@@ -1,4 +1,4 @@
-/* $Id: plugin_i2c_sensors.c,v 1.4 2004/01/29 04:40:02 reinelt Exp $
+/* $Id: plugin_i2c_sensors.c,v 1.5 2004/01/29 05:55:30 reinelt Exp $
*
* I2C sensors plugin
*
@@ -22,6 +22,9 @@
*
*
* $Log: plugin_i2c_sensors.c,v $
+ * Revision 1.5 2004/01/29 05:55:30 reinelt
+ * check for /sys mounted
+ *
* Revision 1.4 2004/01/29 04:40:02 reinelt
* every .c file includes "config.h" now
*
@@ -159,7 +162,11 @@ void my_i2c_sensors_path(void)
int done;
fd1 = opendir(base);
- if (fd1==NULL) return;
+ if (!fd1) {
+ error("[i2c_sensors] Impossible to open %s! Is /sys mounted?", base);
+ return -1;
+ }
+
while((dir = readdir(fd1))) {
// Skip '.' and '..'
if (strcmp(dir->d_name, "." )==0 ||