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
Jean Delvare
61686376df
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 .
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4769 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 12:31:12 +00:00
Jean Delvare
6b3803c386
Fix memory leaks in the configuration file parser when a label, set,
...
compute or ignore statement is found before the first chip statement.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4768 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 12:30:39 +00:00
Jean Delvare
6c4ea89ab9
Renumber SENSORS_FEATURE_VID from 0x300 to 0x1000. If we ever need
...
to add more "standard" feature types such as current or power,
we want to give them numbers that immediately follow the fan, voltage
and temperature features, so that the code is as simple as possible.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4767 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 12:29:20 +00:00
Jean Delvare
29bea1e843
Add support for the standard beep_enable attribute ( #2248 ).
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4766 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 12:28:31 +00:00
Jean Delvare
3c53f5fa85
Increase MAX_SENSORS_PER_TYPE from 16 to 20: the ADM1026 can have up
...
to 17 voltage inputs, and bmcsensors used to support up to 20 voltage
values.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4765 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 08:31:25 +00:00
Jean Delvare
5c121e2b74
Another minor optimization to sensors_read_dynamic_chip():
...
* We don't need a temporary structure for the feature being
currently processed. Instead we can work on the large sparse
array directly.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4764 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 08:29:36 +00:00
Jean Delvare
75bd19ec34
Minor optimizations in sensors_read_dynamic_chip():
...
* We don't need to compute the mapping during the first pass: this
field is overwritten when renumbering the features anyway.
* Only main features have features mapping to them.
* Only subfeatures have mappings, so we can stop the scan at the next
main feature.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4763 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 08:26:26 +00:00
Jean Delvare
b836fc0b53
Now that we can deduce the scaling factor required for each feature
...
from its type, there's no need to store this scaling factor. We can
instead compute it at runtime. This saves some memory (about 10 kB
in my real-world test), and the runtime overhead is totally
negligible.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4762 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 08:21:19 +00:00
Jean Delvare
ed480f2edd
Optimize the memory consumption in sensors_read_dynamic_chip(). The
...
idea is to have separate indexing for subfeatures with a compute
mapping and for subfeatures without it. They still follow each
other in the big table but this avoids wasting memory due to the
numbering gap between them.
This cuts the amount of memory (temporarily) allocated by
sensors_read_dynamic_chip() almost by half, and also speeds it up
a little as it now takes less iterations to walk the sparse array.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4761 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 08:20:35 +00:00
Jean Delvare
23f4274010
Store the feature list length separately instead of null-terminating
...
the list. This make it possible to check for out-of-bound indexes
without walking the entire list, so that direct look-ups are safer.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4760 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 08:19:42 +00:00
Jean Delvare
7975800ac1
Renumber the features linearly, so that feature number N is at
...
position N in the array. This allows for O(1) look-ups, as opposed
to O(N) before. This makes sensors_lookup_feature_nr() 2.4 times
faster in my real-world tests, resulting in a 6% performance boost
on average in the runtime part of "sensors".
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4759 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 08:19:09 +00:00
Jean Delvare
20c98f41b7
The compute mapping value is either SENSORS_NO_MAPPING or the same
...
feature number as the logical mapping. This means that the compute
mapping can be turned into a simple boolean flag. Doing so makes
struct sensors_feature_data smaller, which saves some memory (about
17 kB in my tests.)
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4758 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 08:17:22 +00:00
Jean Delvare
87efbc06c5
Rename sensors_feature_data.mode to flags, as we plan to use it to
...
store non-mode flags soon.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4757 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 08:13:15 +00:00
Jean Delvare
079ba26574
Drop sensors_strip_of_spaces. There's no rationale for stripping
...
trailing spaces of bus names and nothing else.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4756 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 08:07:14 +00:00
Jean Delvare
3d15175ecd
Add max6680-* entry.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4755 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 08:06:03 +00:00
Jean Delvare
2a822a2d96
Start numbering the features at 0, not 1. There's nothing wrong with
...
having a feature number 0, and this makes the code slightly simpler.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4744 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-02 11:15:27 +00:00
Jean Delvare
75859ca9dc
Use the feature type rather than the feature name to figure out whether
...
we need to add "_input" to get the correct sysfs file name. This is
much faster. This is still a ugly hack I'd like to get rid of, but at
least now the slowdown is acceptable.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4743 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-02 11:09:16 +00:00
Jean Delvare
4b012c9f63
Drop useless return.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4742 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-02 10:55:03 +00:00