projects
/
psensor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
updated copyright to 2013
[psensor.git]
/
src
/
lib
/
hdd_hddtemp.c
diff --git
a/src/lib/hdd_hddtemp.c
b/src/lib/hdd_hddtemp.c
index
1013c59
..
9a6d3d3
100644
(file)
--- a/
src/lib/hdd_hddtemp.c
+++ b/
src/lib/hdd_hddtemp.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (C) 2010-201
2
jeanfi@gmail.com
+ * Copyright (C) 2010-201
3
jeanfi@gmail.com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@
-115,7
+115,12
@@
static int str_index(char *str, char d)
static struct psensor *
create_sensor(char *id, char *name, int values_max_length)
{
static struct psensor *
create_sensor(char *id, char *name, int values_max_length)
{
- return psensor_create(id, name, SENSOR_TYPE_HDD_TEMP_HDDTEMP,
+ int t;
+
+ t = SENSOR_TYPE_HDD | SENSOR_TYPE_HDDTEMP | SENSOR_TYPE_TEMP;
+
+ return psensor_create(id, name, strdup("HDD"),
+ t,
values_max_length);
}
values_max_length);
}
@@
-217,7
+222,7
@@
static void update(struct psensor **sensors, struct hdd_info *info)
struct psensor **sensor_cur = sensors;
while (*sensor_cur) {
struct psensor **sensor_cur = sensors;
while (*sensor_cur) {
- if ((*sensor_cur)->type
== SENSOR_TYPE_HDD_TEMP
_HDDTEMP
+ if ((*sensor_cur)->type
& SENSOR_TYPE
_HDDTEMP
&& !strcmp((*sensor_cur)->id + 4, info->name))
psensor_set_current_value(*sensor_cur,
(float)info->temp);
&& !strcmp((*sensor_cur)->id + 4, info->name))
psensor_set_current_value(*sensor_cur,
(float)info->temp);