Commit Graph
580 Commits
Author SHA1 Message Date
Guenter Roeck 443b54b325 Added support for new sysfs attributes
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5898 7894878c-1315-0410-8ee3-d5d059ff63e0
2010-12-14 20:26:27 +00:00
Jean Delvare ff0bfc174d Compute MAX_*_SENSOR_TYPES at build time (#2378).
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5897 7894878c-1315-0410-8ee3-d5d059ff63e0
2010-12-14 09:09:42 +00:00
Jean Delvare a29f126e08 Compute MAX_SUBFEATURES at run-time (#2378).
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5896 7894878c-1315-0410-8ee3-d5d059ff63e0
2010-12-14 09:06:19 +00:00
Guenter Roeck 5cd466477f Fixed typo in lib/sensors.conf.5.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5887 7894878c-1315-0410-8ee3-d5d059ff63e0
2010-12-09 16:31:03 +00:00
Jean Delvare 05a24e5bb2 libsensors: Add support for intrusion detection.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5879 7894878c-1315-0410-8ee3-d5d059ff63e0
2010-11-03 13:00:59 +00:00
Jean Delvare 7f1c32dbd2 Some features are never scaled.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5876 7894878c-1315-0410-8ee3-d5d059ff63e0
2010-11-02 13:00:19 +00:00
Jean Delvare 9b44cc2819 Work with the feature type instead of the shifted subfeature type where
possible. This makes the code more readable.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5875 7894878c-1315-0410-8ee3-d5d059ff63e0
2010-11-02 12:59:31 +00:00
Jean Delvare 62fd781722 Reorganize the temporary sparse subfeature table. It's a little larger
now, but this make it possible to add more feature types without
increasing the code complexity beyond reason. Define constants and use
them to make the code even easier to understand.

If anyone is really worried about the relatively large memory
allocation, one way to improve the situation would be a two-pass
approach. But remember the memory is only needed for a short time...


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5874 7894878c-1315-0410-8ee3-d5d059ff63e0
2010-11-02 12:57:11 +00:00
Jean Delvare f292e9f408 Prepare for release.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5863 7894878c-1315-0410-8ee3-d5d059ff63e0
2010-10-10 19:15:54 +00:00
Jean Delvare e369e65d42 Change libsensors license from GPL to LGPL.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5844 7894878c-1315-0410-8ee3-d5d059ff63e0
2010-07-01 11:56:42 +00:00
Jean Delvare 60635dafc6 Map individual beep features. We had symbols for them for a long time,
I have no idea why they weren't mapped to the sysfs file names.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5843 7894878c-1315-0410-8ee3-d5d059ff63e0
2010-06-21 09:02:30 +00:00
Jean Delvare 573b707d5f Fix a comment.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5827 7894878c-1315-0410-8ee3-d5d059ff63e0
2010-02-23 13:36:46 +00:00
Jean Delvare 5fe10beeda Increase MAX_SENSORS_PER_TYPE to 24. The old value of 20 isn't enough
at least for the W83795G, which has up to 21 voltage inputs.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5826 7894878c-1315-0410-8ee3-d5d059ff63e0
2010-02-23 13:29:05 +00:00
Jean Delvare 6e78c8c779 Prepare for release.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5819 7894878c-1315-0410-8ee3-d5d059ff63e0
2010-02-02 20:14:53 +00:00
Jean Delvare 7c37bd44ac Add support for HID devices.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5786 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-10-18 12:05:16 +00:00
Hans de Goede 271aec857a Add sensor3.conf.5 symlink to sensors.conf.5 manpage
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5776 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-10-01 07:43:41 +00:00
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