Jean Delvare
4d3ee85bae
Support upcoming sysfs path to i2c adapters.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5759 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-07-22 12:53:51 +00:00
Jean Delvare
6868367764
sensors_get_label: Merge pathname and label buffers (patch from
...
George Spelvin).
The lifetimes of the path and label name buffers are
disjoint, so a single buffer can be used for both purposes.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5748 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-06-30 20:52:20 +00:00
Jean Delvare
b3f39211b2
Consolidate strdup calls in sensors_get_label (patch from George Spelvin).
...
There were multiple in-line calls that then fell through to
a common exit. Instead, set up a pointer to the original
strings, and have a single strdup in the common code.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5747 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-06-30 20:47:53 +00:00
Jean Delvare
0a55087719
Bump library version to 4.2.0.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5741 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-06-20 12:00:22 +00:00
Jean Delvare
78f496ca62
libsensors: New method to free the memory allocated for the internal
...
representation of chip names.
sensord, sensors: Fix a memory leak when one or more chip names are
provided on the command line.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5740 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-06-20 10:04:52 +00:00
Jean Delvare
ee26e6d2b0
From Yuriy Kaminskiy:
...
Most filesystems (in particular - reiserfs, jfs, xfs, nfs); maybe,
some legacy installation of ext2/3 too) always return dirent->dt_type =
DT_UNKNOWN, so libsensors fails to parse /etc/sensors.d.
Also, symlink (DT_LNK) can point to directory, or FIFO/socket/device
(very bad!) - current check insufficient anyways.
Fixed by always using stat() to check what each entry is, rather than
relying on dirent->dt_type.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5730 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-06-05 15:17:29 +00:00
Andre Prendel
3e310f8a8f
libsensors: Take into account distribution LDFLAGS (Patch from Didier Roche).
...
From: Didier Roche <didrocks@ubuntu.com >
Hi lm-sensors developer,
It would be great if lm-sensors can take into account distribution
LDFLAGS so that exported variables change linker behavior.
For instance, ubuntu uses -Wl,-Bsymbolic-functions. Taking this patch
will enable us to just sync from debian on this package.
In Ubuntu, we've applied the attached patch to achieve the following:
* handle default ubuntu LDFLAGS for linking option (LP: #321632 )
- Remove the old hack directly pushed in lib/Module.mk (now
lib/Module.mk if from pristine source)
- add debian/patches/07-use-LDFLAGS.patch to take LDFLAGS into account
Debian and Ubuntu thought you might be interested to handle this
directly upstream.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5713 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-04-28 11:54:40 +00:00
Jean Delvare
2ea3bf392b
Make it possible to skip building of the static library. Just run:
...
make BUILD_STATIC_LIB=0
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5711 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-04-20 09:18:06 +00:00
Jean Delvare
e0ad43a545
Include generated source files in dependency checking.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5710 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-04-20 08:42:11 +00:00
Andre Prendel
a03ec09359
Use __func__ in sensors_fatal_error() to get function name.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5674 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-03-02 13:07:23 +00:00
Jean Delvare
c7eab7030f
Fix segmentation fault when passing a custom configuration file.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5665 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-02-26 14:46:47 +00:00
Jean Delvare
0ffa44331c
Set library version to 4.1.0.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5663 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-02-25 07:47:13 +00:00
Jean Delvare
c1a066a307
If str(n)dup fails, there is no more memory left. We should exit with
...
"Out of memory". Patch from Andre Prendel.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5661 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-02-20 10:56:52 +00:00
Jean Delvare
680d5515f6
It is not an error if /etc/sensors.d doesn't exist.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5656 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-02-18 10:17:13 +00:00
Jean Delvare
cba60674e5
Document error-related functions.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5654 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-02-15 20:47:33 +00:00
Jean Delvare
5d30872044
Document function sensors_snprintf_chip_name.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5653 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-02-15 20:46:13 +00:00
Jean Delvare
42beaab3fc
Reorder description section to match synopsis order. Move structure
...
definitions to their own subsection.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5652 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-02-15 20:45:36 +00:00
Jean Delvare
fa3d63daeb
Reformat description section.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5651 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-02-15 20:43:36 +00:00
Jean Delvare
e8ff9211ff
Reformat synopsis section.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5650 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-02-15 20:42:43 +00:00
Jean Delvare
0efe346b80
Include the configuration file name when reporting parse errors.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5649 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-02-15 17:26:57 +00:00
Jean Delvare
6a7286464d
Keep track of configuration file names so that we can later generate
...
better error reports.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5648 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-02-15 17:24:31 +00:00
Jean Delvare
e4ee28d5c8
Read extra configuration files from /etc/sensors.d.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5647 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-02-15 17:22:38 +00:00
Jean Delvare
3ea4545611
Make it possible to only substitute the bus number of a subset of the
...
chip entries. This is a prerequisite to add support for multiple
configuration files. Each configuration file can come with its own bus
statements and the bus number substitution should only affect chip
entries from the same configuration file.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5646 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-02-15 17:19:03 +00:00
Jean Delvare
d5bead6025
Free bus statements from the configuration file as soon as we are done
...
with them.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5645 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-02-15 17:18:01 +00:00
Jean Delvare
16dbc995ec
Exit the configuration file parser as soon as we are done with it.
...
This makes the peak memory consumption significantly lower (-15% using
"sensors" in my tests).
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5644 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-02-15 17:15:31 +00:00
Jean Delvare
b5ec572a5f
Spelling fix.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5642 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-02-12 16:21:34 +00:00
Jean Delvare
30499dc899
Fix inclusion of general.h.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5639 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-02-11 10:12:45 +00:00
Jean Delvare
ea0cfbeadf
Report configuration file read errors.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5638 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-02-10 20:50:16 +00:00
Jean Delvare
556b03e425
Fix memory leak in scanner when using flex 2.5.9 or later.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5637 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-02-08 12:00:24 +00:00
Jean Delvare
09abbcb686
When looking for hwmon device attributes, skip non-file sysfs entries.
...
This speeds things up a little. Patch from Andre Prendel.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5636 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-02-06 13:14:36 +00:00
Jean Delvare
60a1c9927a
Return a string rather than NULL for unknown errors. Patch from
...
Andre Prendel.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5633 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-01-29 12:24:08 +00:00
Jean Delvare
b0f50d0788
Drop stray references to procfs interface.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5631 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-01-29 08:58:36 +00:00
Hans de Goede
11eec21555
Add ACPI bus
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5593 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-01-13 08:06:32 +00:00
Jean Delvare
a16b7a42aa
Delete needless forward declaration.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5583 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-01-11 16:21:15 +00:00
Jean Delvare
c80aefd222
Detect excessive recursion depth during expression evaluation.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5582 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-01-11 12:19:32 +00:00
Jean Delvare
e4d51acf7d
Fix error propagation during expression evaluation.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5581 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-01-11 10:00:19 +00:00
Jean Delvare
c541b7e523
Spelling fixes.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5536 7894878c-1315-0410-8ee3-d5d059ff63e0
2008-12-07 15:27:00 +00:00
Jean Delvare
755fd99aeb
Strip trailing whitespace.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5535 7894878c-1315-0410-8ee3-d5d059ff63e0
2008-12-07 13:17:54 +00:00
Jean Delvare
2e954a6580
Move the help section of sensors.conf.eg to sensors.conf.5, so that
...
we have only one document to maintain. This change also speeds up
sensors by 2.5% when using the default configuration file.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5534 7894878c-1315-0410-8ee3-d5d059ff63e0
2008-12-07 13:14:39 +00:00
Jean Delvare
51a621be43
Add support for current sensors.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5379 7894878c-1315-0410-8ee3-d5d059ff63e0
2008-10-24 09:04:26 +00:00
Jean Delvare
d766935c47
Add support for instantaneous power sensors.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5378 7894878c-1315-0410-8ee3-d5d059ff63e0
2008-10-24 09:03:18 +00:00
Jean Delvare
5b218864d0
Typo fix.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5340 7894878c-1315-0410-8ee3-d5d059ff63e0
2008-09-26 14:54:32 +00:00
Jean Delvare
9fcfb654af
The free_expr() function is no longer static in lib/init.c (it is also
...
used in lib/conf-parse.y), and therefore must be renamed according to
the libsensors naming conventions.
Based on an original patch from Sergey Vlasov.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5302 7894878c-1315-0410-8ee3-d5d059ff63e0
2008-07-14 16:21:48 +00:00
Jean Delvare
d53ba9bb1c
Prepare for release.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5254 7894878c-1315-0410-8ee3-d5d059ff63e0
2008-05-18 16:07:48 +00:00
Jean Delvare
0f2d2724a6
Bugfix: add carriage return ('\r') to the BLANK character class.
...
This closes ticket #2284 .
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5251 7894878c-1315-0410-8ee3-d5d059ff63e0
2008-05-12 11:44:33 +00:00
Darrick J. Wong
bb840c486c
Subject: [PATCH 1/3 v3] libsensors: Support energy and power meters
...
Add power and sensor meters to libsensors, with minor tweaks and
documentation updates as suggested by Jean Delvare.
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com >
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5183 7894878c-1315-0410-8ee3-d5d059ff63e0
2008-04-17 01:27:22 +00:00
Jean Delvare
fdd8139afc
Trivial alignment fix.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5177 7894878c-1315-0410-8ee3-d5d059ff63e0
2008-04-14 15:29:49 +00:00
Jean Delvare
39b96fa477
Add support for virtual hwmon devices. This closes Red Hat bug #437637
...
and ticket #2305 .
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5176 7894878c-1315-0410-8ee3-d5d059ff63e0
2008-04-14 15:27:59 +00:00
Jean Delvare
c84fd9820e
We start at the end of the chip list, going backwards, and we want the
...
late compute statements to override the early ones (as documented in the
sensors.conf manual page), so we must stop as soon as any match is found.
This fixes Debian bug #474596 :
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=474596
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5175 7894878c-1315-0410-8ee3-d5d059ff63e0
2008-04-11 20:41:31 +00:00
Darrick J. Wong
7566fa5b1c
Subject: [PATCH 1/4] libsensors: Detect OpenFirmware hwmon devices
...
On a QS22 blade, the BMC containing the (ibmpex) power meters is enumerated
via Open Firmware. Check for "of_platform" to handle this case.
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com >
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5174 7894878c-1315-0410-8ee3-d5d059ff63e0
2008-04-10 23:24:57 +00:00