diff --git a/lib/access.c b/lib/access.c index 1c799f78..8fd926c0 100644 --- a/lib/access.c +++ b/lib/access.c @@ -521,6 +521,7 @@ static const struct feature_subtype_match temp_matches[] = { { "crit_alarm", SENSORS_FEATURE_TEMP_CRIT_ALARM }, { "fault", SENSORS_FEATURE_TEMP_FAULT }, { "type", SENSORS_FEATURE_TEMP_TYPE }, + { "offset", SENSORS_FEATURE_TEMP_OFFSET }, { NULL, 0 } }; diff --git a/lib/sensors.h b/lib/sensors.h index 7100f1ec..13cea557 100644 --- a/lib/sensors.h +++ b/lib/sensors.h @@ -151,6 +151,7 @@ typedef enum sensors_feature_type { SENSORS_FEATURE_TEMP_CRIT_ALARM, SENSORS_FEATURE_TEMP_FAULT, SENSORS_FEATURE_TEMP_TYPE, + SENSORS_FEATURE_TEMP_OFFSET, SENSORS_FEATURE_VID = 0x1000, diff --git a/lib/sysfs.c b/lib/sysfs.c index 10d69392..8147d525 100644 --- a/lib/sysfs.c +++ b/lib/sysfs.c @@ -1,6 +1,7 @@ /* sysfs.c - Part of libsensors, a library for reading Linux sensor data Copyright (c) 2005 Mark M. Hoffman + Copyright (C) 2007 Jean Delvare This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -37,7 +38,7 @@ char sensors_sysfs_mount[NAME_MAX]; #define MAX_SENSORS_PER_TYPE 20 -#define MAX_SUB_FEATURES 6 +#define MAX_SUB_FEATURES 7 /* Room for all 3 types (in, fan, temp) with all their subfeatures + VID + misc features */ #define ALL_POSSIBLE_FEATURES (MAX_SENSORS_PER_TYPE * MAX_SUB_FEATURES * 6 \ @@ -56,6 +57,7 @@ int get_type_scaling(int type) switch (type) { case SENSORS_FEATURE_VID: + case SENSORS_FEATURE_TEMP_OFFSET: return 1000; default: return 1;