aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreinelt <>2004-01-29 05:55:30 +0000
committerreinelt <>2004-01-29 05:55:30 +0000
commit8291ba6f73d75fa5dc4376c333bd9772567dce12 (patch)
tree73ee6a57dda9126dda618309ef9a8785f5ee0c71
parent31a2b52ff7475a8949e87595f9d67e69b5be975a (diff)
downloadlcd4linux-8291ba6f73d75fa5dc4376c333bd9772567dce12.tar.gz
[lcd4linux @ 2004-01-29 05:55:30 by reinelt]
check for /sys mounted
-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 ||
ss='logmsg'> "timer_inc()" now checks how many trigger intervals have passed since a given timer has been updated. This might be due to "negative clock skew" (think of summer time) or the fact that some processing took too long (i.e. fetching of a web site). These missed trigger intervals are then skipped and the user is notified so that he may adapt his timer settings. This handling is essential, otherwise unprocessed timers might stack up and would trigger continuously while at the same time becoming notoriously late and unreliable. git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1141 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2011-01-05fix for a bug introduced in the DE-LD021 drivermichael1-3/+3 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1140 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2011-01-04indentationmichael2-3/+3 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1139 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2011-01-04support for Sure Electronics DE-LD021 by Natanael Olaizmichael1-10/+8 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1138 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2011-01-02driver for EFN LED modules by Tilman Glötznermichael9-21/+469 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1137 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2010-11-28commented, corrected and beautified both timer and timer group codemzuther11-197/+511 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1136 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2010-11-27finished commenting the timer codemzuther2-46/+138 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1135 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2010-11-20started commenting the timer codemzuther5-52/+170 I'm not done yet, but my system is currently very unstable, and I don't want the changes to get lost... :( git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1134 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2010-11-19Added brightness support for GLCD2USBharbaum5-28/+8014 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1133 3ae390bd-cb1e-0410-b409-cd5a39f66f1f