fixed hdd temp update after flags type changes
authorJean-Philippe Orsini <jeanfi@gmail.com>
Thu, 14 Mar 2013 09:21:21 +0000 (09:21 +0000)
committerJean-Philippe Orsini <jeanfi@gmail.com>
Thu, 14 Mar 2013 09:21:21 +0000 (09:21 +0000)
src/lib/hdd_hddtemp.c
src/lib/psensor.c

index 5c50a5c..7a40211 100644 (file)
@@ -222,7 +222,7 @@ static void update(struct psensor **sensors, struct hdd_info *info)
        struct psensor **sensor_cur = sensors;
 
        while (*sensor_cur) {
-               if ((*sensor_cur)->type == SENSOR_TYPE_HDDTEMP
+               if ((*sensor_cur)->type & SENSOR_TYPE_HDDTEMP
                    && !strcmp((*sensor_cur)->id + 4, info->name))
                        psensor_set_current_value(*sensor_cur,
                                                  (float)info->temp);
index c028c5e..113bacc 100644 (file)
@@ -160,7 +160,7 @@ int psensor_list_contains_type(struct psensor **sensors, unsigned int type)
 
        s = sensors;
        while (*s) {
-               if ((*s)->type == type)
+               if ((*s)->type & type)
                        return 1;
                s++;
        }