diff options
author | Jan Synacek <jsynacek@redhat.com> | 2014-04-29 08:33:13 +0200 |
---|---|---|
committer | Jan Synacek <jsynacek@redhat.com> | 2014-04-30 15:54:14 +0200 |
commit | 55f63d29f5d2b4e82979d71386df58394e87ef5a (patch) | |
tree | 34227f5696df9b3a85c5999d2fd48f50be82681f /src/fan/LMI_FanProvider.c | |
parent | dab89c6afb2a2b339ebadea3d47e841cd749b5ef (diff) | |
download | openlmi-providers-55f63d29f5d2b4e82979d71386df58394e87ef5a.tar.gz openlmi-providers-55f63d29f5d2b4e82979d71386df58394e87ef5a.tar.xz openlmi-providers-55f63d29f5d2b4e82979d71386df58394e87ef5a.zip |
libopenlmi: reorganize and gather
Make naming consistent. Gather common functionality into one library and
try to use it across all providers.
Introduce libtool-style versioning for libraries.
Diffstat (limited to 'src/fan/LMI_FanProvider.c')
-rw-r--r-- | src/fan/LMI_FanProvider.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/fan/LMI_FanProvider.c b/src/fan/LMI_FanProvider.c index 9e780ad..3d7145b 100644 --- a/src/fan/LMI_FanProvider.c +++ b/src/fan/LMI_FanProvider.c @@ -22,8 +22,8 @@ #include <konkret/konkret.h> #include <stdint.h> #include "LMI_Fan.h" -#include "globals.h" #include "fan.h" + static const CMPIBroker* _cb = NULL; static void LMI_FanInitialize(const CMPIContext *ctx) @@ -60,7 +60,7 @@ static CMPIStatus LMI_FanEnumInstances( const char *ns = KNameSpace(cop); CMPIStatus status; - char buf[200]; + char buf[BUFLEN]; struct fanlist *lptr = NULL; struct fanlist *fans = NULL; struct cim_fan *sptr; @@ -82,7 +82,7 @@ static CMPIStatus LMI_FanEnumInstances( LMI_Fan_Set_Caption(&w, "Computer's fan"); LMI_Fan_Set_Description(&w,"Computer's fan."); - snprintf(buf, 200, "Fan \"%s\" on chip \"%s\"", sptr->name, sptr->chip_name); + snprintf(buf, BUFLEN, "Fan \"%s\" on chip \"%s\"", sptr->name, sptr->chip_name); LMI_Fan_Set_ElementName(&w, buf); // ManagedSystemElement @@ -102,7 +102,7 @@ static CMPIStatus LMI_FanEnumInstances( " Thus the measurement for this channel should not be trusted." : "Fan seems to be functioning correctly."); if (sptr->alarm || sptr->alarm_min || sptr->alarm_max) { - snprintf(buf, 200, "These alarm flags are set by the fan's chip:" + snprintf(buf, BUFLEN, "These alarm flags are set by the fan's chip:" " alarm=%s, min_alarm=%s, max_alarm=%s", sptr->alarm ? "1":"0", sptr->alarm_min ? "1":"0", @@ -136,7 +136,7 @@ static CMPIStatus LMI_FanEnumInstances( uint32_t i = 1; int index = 0; - debug("accessible_features: %d", sptr->accessible_features); + lmi_debug("accessible_features: %d", sptr->accessible_features); LMI_Fan_Init_AccessibleFeatures(&w, 8); while (i <= CIM_FAN_AF_FEATURE_MAX) { if (i & sptr->accessible_features) { |