Commit Graph
103 Commits
Author SHA1 Message Date
Jean Delvare b029b8f861 sensord: Drop workaround needed by old versions of rrdtool. The bug
(missing getopt variables initialization) was fixed in rrdtool version
1.2.1, 2.5 years ago.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5072 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-12-11 22:56:47 +00:00
Jean Delvare 9dbde1cc06 Drop unneeded include.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5071 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-12-11 22:00:49 +00:00
Jean Delvare e257a45fed sensord: Use the same colors for daily and weekly charts.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5070 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-12-11 21:48:34 +00:00
Jean Delvare 4f8196934c sensord: Fix rrd support (#2276).
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5069 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-12-11 13:14:39 +00:00
Jean Delvare 35a5a7dbce Use /etc/sensors3.conf as the default configuration file. If it can't
be found, fallback to /etc/sensors.conf. This allows for an old
libsensors and a new libsensors to be installed in parallel, and each
one has its own configuration file.

One important change here is that the default configuration file will
be installed as /etc/sensors3.conf by "make install".


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4990 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-10-25 09:59:05 +00:00
Jean Delvare 6d5292cce4 "sensord" no longer needs a default configuration file name. If no
file name is provided on the command line, use the libsensors default.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4987 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-10-25 09:50:17 +00:00
Jean Delvare 3d9acfa6f9 sensord: Reload config on SIGHUP rather than automatically.
Reloading the configuration on SIGHUP is common for daemons. Reloading
automatically is less efficient and can be confusing or even racy.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4969 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-10-20 14:05:35 +00:00
Jean Delvare ff46494457 sensord manual page update.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4919 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-10-07 07:32:21 +00:00
Jean Delvare 3a87a433fd Drop the configuration file search path mechanism from sensord. It's
confusing and useless. We dropped it from sensors years ago.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4918 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-10-07 07:23:32 +00:00
Jean Delvare cb5a94578d Chip-specific code is gone.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4914 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-10-01 17:05:34 +00:00
Jean Delvare 43e4f551b7 Log the error code on failure, to make it easier to investigate
problems.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4888 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-26 17:15:13 +00:00
Jean Delvare 4b6f9ee727 Better error message if configuration file can't be loaded.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4853 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-23 13:48:52 +00:00
Jean Delvare c390c9e29f Hide warnings about unused parameters.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4849 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-23 12:47:27 +00:00
Jean Delvare e01466d993 New public library function: sensors_get_subfeature(). Applications can
use it to retrieve a specific subfeature by type. While it is slighly
less efficient than looping over sensors_get_all_subfeatures(), it
often makes the application code much more elegant.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4846 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-23 12:30:28 +00:00
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 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 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 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 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 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 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 7268001a5d libsensors no longer returns ignored features so no need to check for
this in applications anymore.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4709 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-26 11:45:46 +00:00
Jean Delvare c91457b7de Executing the set statements is an exclusive action.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4706 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-26 08:57:48 +00:00
Jean Delvare 4d6bec8bb2 Add a parameter to sensors_get_detected_chips(), to optionally let the
caller select which subset of chips it wants. This is slightly better
size-wise than letting all applications do the filtering by themselves.

This will change the way the command line parameters of "sensors" are
interpreted. Beforehand, the chips were always returned in the order
in which they were listed by the library. Also, each chip could be listed
only once. From now on, the chips will be listed in the order in which
they are passed on the command line, which I think makes more sense. A
side effect is that chips can be listed more than once, if that's what
the user asks for. Not very useful though.

This change makes it possible to make sensors_match_chip() internal
to the library. Filtering the list of chips returned by
sensors_get_detected_chips() was the last known external use for this
function.

This patch looks much bigger than it really is, but the largest part is
really only code reindentation.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4701 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-26 08:26:20 +00:00
Jean Delvare 0c24a60643 Drop the CONFORMING TO sections from the man pages. lm-sensors is in no way
an official standard so it doesn't make much sense. Instead, use the 4th
field of .TH to mention that these tools are part of lm-sensors.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4699 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-23 08:14:48 +00:00
Jean Delvare b0fb417996 sensors_get_value() and sensors_set_value(), respectively.
The new names better reflect what the functions do.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4695 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-22 17:06:13 +00:00
Jean Delvare 8bcdc331a0 Change the prototype of sensors_get_label(). Errors can be reported
with a NULL pointer.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4694 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-22 17:05:01 +00:00
Jean Delvare 12655c1d85 Drop support for reloading the configuration with sensors_init().
Instead, the application will have to call sensors_exit() explicitly
before calling sensors_init() again. Most applications don't offer
any way to reload the configuration file, so better optimize for the
initial load.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4693 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-22 17:04:12 +00:00
Jean Delvare 7ee15371df Support more bus types (part 1 of 2). Originally libsensors was very
i2c-centric. Make it more neutral so that we can cleanly support
additional bus types such as SPI or One-Wire.

This first part introduces sensors_bus_id, and updates
sensors_chip_name to use it.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4686 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-19 15:03:50 +00:00
Jean Delvare edb42b3c16 Add a new function to libsensors doing the opposite of
sensors_parse_chip_name(). sensors_snprintf_chip_name() converts
a chip name from its internal representation to a human readable
string. So far, each user program had to reimplement this function.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4676 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-16 10:04:57 +00:00
Jean Delvare 3b25c8dc22 Pass structures by reference in sensors and sensord, again for a
small performance gain and better consistency with the new
libsensors API.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4668 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-13 20:19:44 +00:00
Jean Delvare 3bab00fff9 Change the libsensors API so that all structures are passed by
reference. This is more efficient that way.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4666 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-13 20:16:03 +00:00
Jean Delvare 6c8dde0740 Add missing w83627ehf in9.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4284 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-01-06 22:38:37 +00:00
Jean Delvare ddd9ba2baf sensord: Add support for the k8temp driver and for the voltage inputs
of the w83627ehf driver. Patch from Dave Platt.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4281 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-01-06 08:49:59 +00:00
Jean Delvare 5d9df247af Add support for the w83627dhg. Original patch by David Holl.
This closes ticket #2157.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4265 7894878c-1315-0410-8ee3-d5d059ff63e0
2006-12-18 12:22:35 +00:00