diff options
author | Jean Delvare <khali@linux-fr.org> | 2007-09-23 12:30:28 +0000 |
---|---|---|
committer | Jean Delvare <khali@linux-fr.org> | 2007-09-23 12:30:28 +0000 |
commit | e01466d9931624f6b34e1e2ef9efab1e82e60030 (patch) | |
tree | c65987d3fa6f13050d392e4af7f07c9c4b40a3cd /lib/sensors.h | |
parent | c08a1683422520d7323997014312c3c4eac12daa (diff) | |
download | lm-sensors-git-e01466d9931624f6b34e1e2ef9efab1e82e60030.tar.gz |
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
Diffstat (limited to 'lib/sensors.h')
-rw-r--r-- | lib/sensors.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/sensors.h b/lib/sensors.h index e6fc8414..1cae70f3 100644 --- a/lib/sensors.h +++ b/lib/sensors.h @@ -221,6 +221,15 @@ const sensors_subfeature * sensors_get_all_subfeatures(const sensors_chip_name *name, const sensors_feature *feature, int *nr); +/* This returns the subfeature of the given type for a given main feature, + if it exists, NULL otherwise. + Do not try to change the returned structure; you will corrupt internal + data structures. */ +const sensors_subfeature * +sensors_get_subfeature(const sensors_chip_name *name, + const sensors_feature *feature, + sensors_subfeature_type type); + #ifdef __cplusplus } #endif /* __cplusplus */ |