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
Rename SENSORS_ERR_PROC to the more neutral SENSORS_ERR_KERNEL.
Introduce SENSORS_ERR_NO_DEVS for finer-grained error reporting.
Use SENSORS_ERR_KERNEL and SENSORS_ERR_NO_DEVS where appropriate.
No error message for invalid error codes.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4854 7894878c-1315-0410-8ee3-d5d059ff63e0
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
* do_sets, do_raw and hide_adapter are only used in main.c and could
thus be declared static.
* fahrenheit and degstr are used in chips.c as well, so they should be
declared in a header file.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4713 7894878c-1315-0410-8ee3-d5d059ff63e0
longer need to build an array from the chip names passed on the
command line. Instead, we can process them one after the other
directly. This saves some memory and allows for minor code cleanups.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4703 7894878c-1315-0410-8ee3-d5d059ff63e0
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
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
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
abituguru seems to work well with the new dynamic chip support and generic
chip printroutines. note: the abituguru code should be completly removed in
the future.
-comment k8temp entry in lib/chips.c and prog/sensors/main.c, as the
k8temp seems to work well with the new dynamic chip support and generic
chip printroutines. note: the k8temp code should be completly removed in
the future.
-make the match for the subtype exact instead of a strncmp, otherwise
an alarm_enable flag gets classified as an alarm, leading to all sensors who
have their alarm enabled getting an alarm reported, as the alarm_enabled gets
read as alarm.
-and do the same for the _input match to check if this is a main or subfeature
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4367 7894878c-1315-0410-8ee3-d5d059ff63e0