Evaluate return value of idChip().
Some of the functions called from idChip() can fail which means
idChip() can return an error. Callers of idChip() should be aware of
this.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5795 7894878c-1315-0410-8ee3-d5d059ff63e0
This patch does some refactoring of function doKnownChip().
* doKnownChip() is a huge function with deep indentation
levels. Splitting this funcion up into smaller ones makes code much
more readable.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5794 7894878c-1315-0410-8ee3-d5d059ff63e0
This patch changes the signature of function pointer (*FeatureFN) and
the related functions:
rrdGetSensors_DS()
rrdCGI_DEF()
rrdCGI_LINE()
Return type is now void because none of the functions return an error
code.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5793 7894878c-1315-0410-8ee3-d5d059ff63e0
This patch cleans up function applyToFeature().
Function applyToFeature() is nearly unreadable. There are some deep
levels of indentation and cascades of loops makes code flow difficult to
read.
I split up this function into three smaller one. This reduces
indentation levels and makes code flow clearer.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5792 7894878c-1315-0410-8ee3-d5d059ff63e0
This patch removes some needless casts. We don't have to cast
explicitly from void * (in C).
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5791 7894878c-1315-0410-8ee3-d5d059ff63e0
This patch converts HTML code in the generated CGI script to lower
case. This makes us a bit more XHTML compatible.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5790 7894878c-1315-0410-8ee3-d5d059ff63e0
This patch fixes some coding style issues.
* Remove whitespaces between variable and increment operator.
* Break long lines.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5789 7894878c-1315-0410-8ee3-d5d059ff63e0
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
normally done by a human on a console, rather than in the background,
so the system log isn't where people would look for error messages.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5734 7894878c-1315-0410-8ee3-d5d059ff63e0
This is caused by a missing file (prog/sensord/args.h) in commit:
r5719 sensord: Introduce struct sensord_args.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5732 7894878c-1315-0410-8ee3-d5d059ff63e0
* Fix deep indentation levels
* Return with unique error code (-1)
* Rename buffer for struct stat from tmp to sb.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5724 7894878c-1315-0410-8ee3-d5d059ff63e0
This structure encapsulate all the variables holding the commandline
arguments. So we get rid of plenty of extern variables. This reduces
namespace collisions and unifies access.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5719 7894878c-1315-0410-8ee3-d5d059ff63e0
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
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
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
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
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
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