aboutsummaryrefslogtreecommitdiffstats
path: root/plugin_i2c_sensors.c
diff options
context:
space:
mode:
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2004-06-20 10:09:56 +0000
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2004-06-20 10:09:56 +0000
commit7ac3e2a7d2c23ea71adeb56d8afbe1b1cbeee4df (patch)
treec9fe5fa4426d7334d8486a3a7e59c64a43d2ef9e /plugin_i2c_sensors.c
parente4626159694ea6774386faa2f0d2fb517de1eb8b (diff)
downloadlcd4linux-7ac3e2a7d2c23ea71adeb56d8afbe1b1cbeee4df.tar.gz
[lcd4linux @ 2004-06-20 10:09:52 by reinelt]
'const'ified the whole source git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@476 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'plugin_i2c_sensors.c')
-rw-r--r--plugin_i2c_sensors.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/plugin_i2c_sensors.c b/plugin_i2c_sensors.c
index 14ef61e..cf6cdeb 100644
--- a/plugin_i2c_sensors.c
+++ b/plugin_i2c_sensors.c
@@ -1,4 +1,4 @@
-/* $Id: plugin_i2c_sensors.c,v 1.18 2004/06/17 06:23:43 reinelt Exp $
+/* $Id: plugin_i2c_sensors.c,v 1.19 2004/06/20 10:09:56 reinelt Exp $
*
* I2C sensors plugin
*
@@ -23,6 +23,10 @@
*
*
* $Log: plugin_i2c_sensors.c,v $
+ * Revision 1.19 2004/06/20 10:09:56 reinelt
+ *
+ * 'const'ified the whole source
+ *
* Revision 1.18 2004/06/17 06:23:43 reinelt
*
* hash handling rewritten to solve performance issues
@@ -168,13 +172,13 @@ static const char *procfs_tokens[4][3] = {
{"fan_min", "fan_input", ""} // for fan#
};
-static int (*parse_i2c_sensors)(char *key);
+static int (*parse_i2c_sensors)(const char *key);
/***********************************************\
* Parsing for new 2.6 kernels 'sysfs' interface *
\***********************************************/
-static int parse_i2c_sensors_sysfs(char *key)
+static int parse_i2c_sensors_sysfs(const char *key)
{
char val[32];
char buffer[32];
@@ -221,7 +225,7 @@ static int parse_i2c_sensors_sysfs(char *key)
* Parsing for old 2.4 kernels 'procfs' interface *
\************************************************/
-static int parse_i2c_sensors_procfs(char *key)
+static int parse_i2c_sensors_procfs(const char *key)
{
char file[64];
FILE *stream;
@@ -232,7 +236,7 @@ static int parse_i2c_sensors_procfs(char *key)
int pos=0;
const char delim[3]=" \n";
char final_key[32];
- char *number = &key[strlen(key)-1];
+ const char *number = &key[strlen(key)-1];
int tokens_index;
// debug("%s -> %s", key, number);
strcpy(file, path);
@@ -310,7 +314,7 @@ void my_i2c_sensors(RESULT *result, RESULT *arg)
}
-void my_i2c_sensors_path(char *method)
+void my_i2c_sensors_path(const char *method)
{
struct dirent *dir;
struct dirent *file;