From 7b8fdf018895e384e852a314bc03337a6a3c557d Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Tue, 10 Jul 2007 19:55:06 +0000 Subject: [PATCH] Advertise and document libsensors_version. git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4602 7894878c-1315-0410-8ee3-d5d059ff63e0 --- lib/libsensors.3 | 5 +++++ lib/sensors.h | 2 ++ prog/sensors/main.c | 1 - 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/libsensors.3 b/lib/libsensors.3 index b0295b9a..046a9dfe 100644 --- a/lib/libsensors.3 +++ b/lib/libsensors.3 @@ -50,6 +50,7 @@ libsensors \- publicly accessible functions provided by the sensors library .B const sensors_chip_name *sensors_get_detected_chips(int *nr); .B const sensors_feature_data *sensors_get_all_features \fB(sensors_chip_name name, int *nr1,int *nr2);\fP +.B const char *libsensors_version; .fi .SH DESCRIPTION .B int sensors_init(FILE *input); @@ -134,6 +135,10 @@ SENSORS_MODE_NO_RW, SENSORS_MODE_R, SENSORS_MODE_W or SENSORS_MODE_RW. .br This returns all features of a specific chip. They are returned in bunches: everything with the same mapping is returned just after each other, with the master feature in front (that feature does not map to itself, but has SENSORS_NO_MAPPING as mapping field). nr1 and nr2 are two internally used variables. Set both to zero to start again at the begin of the list. If no more features are found NULL is returned. Do not try to change the returned structure; you will corrupt internal data structures. +\fBconst char *libsensors_version;\fP +.br +A string representing the version of libsensors. + .SH "CONFORMING TO" lm_sensors-2.x diff --git a/lib/sensors.h b/lib/sensors.h index 987742a3..75fe5208 100644 --- a/lib/sensors.h +++ b/lib/sensors.h @@ -37,6 +37,8 @@ extern "C" { #endif /* __cplusplus */ +extern const char *libsensors_version; + /* A chip name is encoded is in this structure */ typedef struct sensors_chip_name { char *prefix; diff --git a/prog/sensors/main.c b/prog/sensors/main.c index 03c6670e..ef52a140 100644 --- a/prog/sensors/main.c +++ b/prog/sensors/main.c @@ -41,7 +41,6 @@ #define DEFAULT_CONFIG_FILE_NAME "sensors.conf" FILE *config_file; -extern const char *libsensors_version; extern int main(int argc, char *arv[]); static void print_short_help(void);