Re: [PATCH] libsensors: Add missing attributes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Guenter,

I forgot something during my review yesterday:

On Fri, 10 Dec 2010 11:50:05 -0800, Guenter Roeck wrote:
> The attributes added in this patch are listed in the current version
> of the hwmon sysfs ABI, but not yet supported by libsensors.
> 
> This patch only adds the new attributes to libsensors. The sensors command
> will be updated in a separate patch.
> 
> Signed-off-by: Guenter Roeck <guenter.roeck@xxxxxxxxxxxx>
> ---
> (...)
> Index: lib/sensors.h
> ===================================================================
> --- lib/sensors.h	(revision 5889)
> +++ lib/sensors.h	(working copy)
> (...)
> @@ -170,6 +172,9 @@
>  	SENSORS_SUBFEATURE_TEMP_MIN,
>  	SENSORS_SUBFEATURE_TEMP_CRIT,
>  	SENSORS_SUBFEATURE_TEMP_CRIT_HYST,
> +	SENSORS_SUBFEATURE_TEMP_LCRIT,
> +	SENSORS_SUBFEATURE_TEMP_EMERGENCY,
> +	SENSORS_SUBFEATURE_TEMP_EMERGENCY_HYST,

Please double-check the value of MAX_SUBFEATURES after that. I think
you'll have to increase it from 8 to 9.

We want to either add code to check for such overflows (I have a patch
ready) or compute MAX_SUBFEATURES dynamically (see ticket #2378,
probably a better move) to avoid such problems again and again in the
future.

>  	SENSORS_SUBFEATURE_TEMP_ALARM = (SENSORS_FEATURE_TEMP << 8) | 0x80,
>  	SENSORS_SUBFEATURE_TEMP_MAX_ALARM,
>  	SENSORS_SUBFEATURE_TEMP_MIN_ALARM,

-- 
Jean Delvare

_______________________________________________
lm-sensors mailing list
lm-sensors@xxxxxxxxxxxxxx
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors


[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux