Changeset 4769

Show
Ignore:
Timestamp:
09/05/07 14:31:12 (1 year ago)
Author:
khali
Message:

Add support for temperature offset files, which are part of the
standard sysfs interface. I don't think it makes much sense to
display the offset values as part of the output of "sensors" (it
would even probably confuse people) but having support for these
in libsensors makes it possible to adjust the offsets in
sensors.conf, which is convenient.

This closes ticket #2248.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lm-sensors/branches/lm-sensors-3.0.0/lib/access.c

    r4766 r4769  
    522522        { "fault", SENSORS_FEATURE_TEMP_FAULT }, 
    523523        { "type", SENSORS_FEATURE_TEMP_TYPE }, 
     524        { "offset", SENSORS_FEATURE_TEMP_OFFSET }, 
    524525        { NULL, 0 } 
    525526}; 
  • lm-sensors/branches/lm-sensors-3.0.0/lib/sensors.h

    r4767 r4769  
    152152        SENSORS_FEATURE_TEMP_FAULT, 
    153153        SENSORS_FEATURE_TEMP_TYPE, 
     154        SENSORS_FEATURE_TEMP_OFFSET, 
    154155 
    155156        SENSORS_FEATURE_VID = 0x1000, 
  • lm-sensors/branches/lm-sensors-3.0.0/lib/sysfs.c

    r4766 r4769  
    22    sysfs.c - Part of libsensors, a library for reading Linux sensor data 
    33    Copyright (c) 2005 Mark M. Hoffman <mhoffman@lightlink.com> 
     4    Copyright (C) 2007 Jean Delvare <khali@linux-fr.org> 
    45 
    56    This program is free software; you can redistribute it and/or modify 
     
    3839 
    3940#define MAX_SENSORS_PER_TYPE    20 
    40 #define MAX_SUB_FEATURES        6 
     41#define MAX_SUB_FEATURES        7 
    4142/* Room for all 3 types (in, fan, temp) with all their subfeatures + VID 
    4243   + misc features */ 
     
    5758        switch (type) { 
    5859        case SENSORS_FEATURE_VID: 
     60        case SENSORS_FEATURE_TEMP_OFFSET: 
    5961                return 1000; 
    6062        default: