2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-08-29 05:17:50 +00:00

4039 Commits

Author SHA1 Message Date
Jean Delvare
da7b4e48da Introduce a separate type for main features. Make subfeatures map to
the real main feature rather than the first subfeature.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4838 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-23 12:16:50 +00:00
Jean Delvare
65f1d1f1cd Rename subfeature types from *_FEATURE_* to *_SUBFEATURE_*, to better
reflect what they represent.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4837 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-23 12:12:19 +00:00
Jean Delvare
e13c11d353 Update the comments and symbols in the whole library code to refer to
features and subfeatures as appropriate.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4836 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-23 12:07:53 +00:00
Jean Delvare
9fe2b3c714 sensors_get_all_features has a single caller now, so fold
it thereinto.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4835 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-23 12:06:51 +00:00
Jean Delvare
96c914bfda Define a separate structure to represent main features. This allows
for faster main features lookup. One side effect of this change is
that subfeatures can no longer have labels nor be ignored. I do not
think that this is a problem in practice, and actually this makes a
lot of sense.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4834 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-23 12:05:16 +00:00
Jean Delvare
bfe337fe76 Store current temperature, voltage and fan values together with
the rest of the subfeatures. This makes the code more simple, and
prepares for current values to be subfeatures like any others (i.e.
they can be missing.)


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4833 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-23 12:02:59 +00:00
Jean Delvare
79086fb7b8 Rename struct sensors_feature_data to sensors_subfeature. This is a
first step towards a clean separation between main features and
subfeatures.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4832 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-23 12:02:22 +00:00
Jean Delvare
eba601a964 Split sensors_get_all_features() into two distinct functions, one to
get the list of all main features, and one to get the list of all the
subfeatures of a given main feature. This is a more logical interface for
applications to use. The current implementation is admittedly less than
optimal, because the storage structures weren't meant for it, but this
issue can (and will) be addressed later.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4831 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-23 12:00:59 +00:00
Jean Delvare
08a686e3cc sensors_feature_data and sensors_chip_feature are now the exact
same structure, so we can get rid of the former for simpler code.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4830 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-23 11:59:51 +00:00
Jean Delvare
60b50b6cb9 Fix compilation breakage with non-C99 compilers.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4829 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-21 18:15:32 +00:00
Jean Delvare
5bd020ad92 Scan chip features only once at initialization time, rather than on
each update. The chip list and chip features do not change until
sensors_cleanup() is called, so there's no point in doing the
same work over and over again.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4828 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-21 12:15:18 +00:00
Jean Delvare
49649fcf05 Restore support for beeps.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4827 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-20 21:24:12 +00:00
Jean Delvare
9cf1330eb0 Add support for beep features.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4826 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-20 21:23:19 +00:00
Jean Delvare
36ded1b5fc Restore support for alarms.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4825 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-20 21:22:42 +00:00
Jean Delvare
071e4a8008 Rename a few variables to something that makes more sense.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4824 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-20 16:22:13 +00:00
Jean Delvare
a46211007e Better error handling when a feature value can't be read.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4822 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-19 16:53:16 +00:00
Jean Delvare
afddd25552 Drop support for printing unknown chips: all chips are known now.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4819 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-19 15:16:14 +00:00
Jean Delvare
2837b67281 Delete unused formatting functions.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4818 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-19 15:12:58 +00:00
Jean Delvare
2e773670b8 Add generic chip support to sensord, much like sensors has.
Alarm and beep mask support is still missing.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4817 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-19 15:11:34 +00:00
Jean Delvare
d3b00b0a86 Fix memory leaks in command line parsing.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4816 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-19 15:10:06 +00:00
Jean Delvare
347b0d1965 Fix a memory leak when daemonizing.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4815 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-19 14:25:19 +00:00
Jean Delvare
9730c57395 Add some more conversion rules for the thmc50 and adm1022.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4814 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-19 12:06:36 +00:00
Jean Delvare
4618795d52 Add a sample configuration section for the thmc50 and adm1022.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4813 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-19 12:05:31 +00:00
Jean Delvare
0ec61f1bc7 Warning fixes.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4807 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-18 20:53:42 +00:00
Jean Delvare
73cdb48635 Fix compilation breakage.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4806 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-18 20:46:06 +00:00
Jean Delvare
7d049ef600 Drop all the chip-specific support from sensord.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4805 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-18 20:37:36 +00:00
Jean Delvare
bf9d0e2de6 Drop DataType_mhz, libsensors doesn't support this kind of feature.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4804 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-18 20:26:28 +00:00
Jean Delvare
8c817feaca Stop including obsolete header files.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4803 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-18 20:19:26 +00:00
Jean Delvare
fee42795a2 Synchronize the sensord version with the lm-sensors version. We're
using the same version number for sensord since October 2002!


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4802 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-18 19:35:28 +00:00
Jean Delvare
0464f51062 Fix fan fault handling. We were testing for fan fault before actually
retrieving the fan features, so faults could not be detected. Swapping
the instructions fixes it.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4801 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-18 09:38:14 +00:00
Mark M. Hoffman
fb362daf8d The sensors.conf file syntax currently allows for octal escape sequences, which
nobody uses. This feature is not even mentioned in the sensors.conf man page.
Kill it.



git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4797 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-16 15:47:16 +00:00
Mark M. Hoffman
91866b3ea1 Make sensors.conf entirely case-sensitive.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4796 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-16 15:34:52 +00:00
Mark M. Hoffman
db283337af Add the following to svn:ignore properties:
./patches
	./.pc
	./prog/sensors/sensors3


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4795 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-16 14:59:14 +00:00
Mark M. Hoffman
e95e7694f5 Fix -W options so flex/yacc code compiles completely without warnings. Also,
Use -Wundef everywhere except flex/yacc code, specifically.



git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4794 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-16 14:50:37 +00:00
Jean Delvare
ab0e8eb731 Complete the previous memory leak fix.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4793 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-09 17:32:59 +00:00
Jean Delvare
3ff2df927b Fix sensors output when a temperature channel has a critical limit but
no max limit (for example the coretemp driver.)


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4791 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-08 10:47:03 +00:00
Jean Delvare
44c669a26d Don't use -Wundef for the library, flex/bison-generated code doesn't play
well with it.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4783 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 21:31:01 +00:00
Jean Delvare
042532f7fb Delete grab_busses.sh, it's deprecated. Use sensors --bus-list instead.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4782 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 21:22:39 +00:00
Jean Delvare
8f352d518c New sensors option: --bus-list. This option lists i2c buses that are
used by sensor chips on the running system, in a format suitable for
sensors.conf. This is a replacement for the old, broken grab_busses.sh
script. Benefits of having this directly in sensors:
* It lists only the i2c buses that are relevant to sensors.
* sensors is installed by default, while most people didn't have
  access to grab_busses.sh.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4781 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 21:19:45 +00:00
Jean Delvare
5e5a996d83 Delete redundant declarations.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4780 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 20:19:35 +00:00
Jean Delvare
551500530f Fix header comment.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4779 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 20:12:52 +00:00
Jean Delvare
5dec68540f Warning fix.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4778 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 20:10:00 +00:00
Jean Delvare
ff8230310b Stop mentioning the alias trick for i2c-dev, it no longer works and it
doesn't have anything to do with sensors anyway.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4777 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 16:45:19 +00:00
Jean Delvare
65b9d4dd92 Move sensors_feature_get_type() from access.c to sysfs.c, it's only called
from this file. This lets the compiler do additional optimizations.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4776 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 16:14:53 +00:00
Jean Delvare
c8de951071 Strip trailing whitespace.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4775 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 16:09:38 +00:00
Jean Delvare
8b30917c16 Don't print an error message when libsensors returns a feature
we don't know. Just ignore that feature.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4774 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 15:56:28 +00:00
Jean Delvare
1d05faf18b More cleanups: drop legacy references, sections for drivers not
yet ported to Linux 2.6, etc.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4773 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 15:52:56 +00:00
Jean Delvare
d577b6eaae Convert the default configuration file to use the new smybol names.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4772 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 15:00:40 +00:00
Jean Delvare
39f93afc8a Print the conversion notice at the top of the converted file, not on
stdout.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4771 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 14:32:31 +00:00
Jean Delvare
f27710deb7 sensors-conf-convert: New, script to convert old configuration files
to use the new symbol names.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4770 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 14:28:19 +00:00