summaryrefslogtreecommitdiffstats
path: root/src/fan
diff options
context:
space:
mode:
authorRadek Novacek <rnovacek@redhat.com>2012-08-27 15:01:46 +0200
committerRadek Novacek <rnovacek@redhat.com>2012-08-28 14:37:33 +0200
commit4721a6cb186e7d6908ff1f361d0bc81e182473ad (patch)
treed63f8e7b8db9bdbfca8b6c85d21642ad237fc6eb /src/fan
parent3333004967971ad1720b74da4ce09949f023852e (diff)
downloadopenlmi-providers-4721a6cb186e7d6908ff1f361d0bc81e182473ad.tar.gz
openlmi-providers-4721a6cb186e7d6908ff1f361d0bc81e182473ad.tar.xz
openlmi-providers-4721a6cb186e7d6908ff1f361d0bc81e182473ad.zip
Rename prefix from Cura_ to LMI_
Diffstat (limited to 'src/fan')
-rw-r--r--src/fan/CMakeLists.txt4
-rw-r--r--src/fan/LMI_FanAssociatedSensorProvider.c (renamed from src/fan/Cura_FanAssociatedSensorProvider.c)86
-rw-r--r--src/fan/LMI_FanProvider.c (renamed from src/fan/Cura_FanProvider.c)168
-rw-r--r--src/fan/LMI_FanSensorProvider.c (renamed from src/fan/Cura_FanSensorProvider.c)188
4 files changed, 223 insertions, 223 deletions
diff --git a/src/fan/CMakeLists.txt b/src/fan/CMakeLists.txt
index 51671b4..6e9ab97 100644
--- a/src/fan/CMakeLists.txt
+++ b/src/fan/CMakeLists.txt
@@ -1,11 +1,11 @@
set(PROVIDER_NAME Fan)
set(LIBRARY_NAME cmpiCura_${PROVIDER_NAME})
-set(MOF Cura_Fan.mof)
+set(MOF LMI_Fan.mof)
set(provider_SRCS
fan.c
- Cura_FanProvider.c
+ LMI_FanProvider.c
)
konkretcmpi_generate(${MOF}
diff --git a/src/fan/Cura_FanAssociatedSensorProvider.c b/src/fan/LMI_FanAssociatedSensorProvider.c
index 4674171..d89a1fd 100644
--- a/src/fan/Cura_FanAssociatedSensorProvider.c
+++ b/src/fan/LMI_FanAssociatedSensorProvider.c
@@ -17,18 +17,18 @@
*/
#include <konkret/konkret.h>
-#include "Cura_FanAssociatedSensor.h"
+#include "LMI_FanAssociatedSensor.h"
#include "fan.h"
#include <globals.h>
static const CMPIBroker* _cb;
-static void Cura_FanAssociatedSensorInitialize()
+static void LMI_FanAssociatedSensorInitialize()
{
init_linux_fan_module();
}
-static CMPIStatus Cura_FanAssociatedSensorCleanup(
+static CMPIStatus LMI_FanAssociatedSensorCleanup(
CMPIInstanceMI* mi,
const CMPIContext* cc,
CMPIBoolean term)
@@ -36,7 +36,7 @@ static CMPIStatus Cura_FanAssociatedSensorCleanup(
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Cura_FanAssociatedSensorEnumInstanceNames(
+static CMPIStatus LMI_FanAssociatedSensorEnumInstanceNames(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -46,7 +46,7 @@ static CMPIStatus Cura_FanAssociatedSensorEnumInstanceNames(
_cb, mi, cc, cr, cop);
}
-static CMPIStatus Cura_FanAssociatedSensorEnumInstances(
+static CMPIStatus LMI_FanAssociatedSensorEnumInstances(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -65,25 +65,25 @@ static CMPIStatus Cura_FanAssociatedSensorEnumInstances(
// iterate fan list
while (lptr) {
sptr = lptr->f;
- Cura_FanAssociatedSensor w;
- Cura_FanAssociatedSensor_Init(&w, _cb, ns);
+ LMI_FanAssociatedSensor w;
+ LMI_FanAssociatedSensor_Init(&w, _cb, ns);
- Cura_FanRef fan;
- Cura_FanRef_Init(&fan, _cb, ns);
- Cura_FanRef_Set_CreationClassName(&fan, "Cura_Fan");
- Cura_FanRef_Set_DeviceID(&fan, sptr->device_id);
- Cura_FanRef_Set_SystemCreationClassName(&fan, get_system_creation_class_name());
- Cura_FanRef_Set_SystemName(&fan, get_system_name());
+ LMI_FanRef fan;
+ LMI_FanRef_Init(&fan, _cb, ns);
+ LMI_FanRef_Set_CreationClassName(&fan, "LMI_Fan");
+ LMI_FanRef_Set_DeviceID(&fan, sptr->device_id);
+ LMI_FanRef_Set_SystemCreationClassName(&fan, get_system_creation_class_name());
+ LMI_FanRef_Set_SystemName(&fan, get_system_name());
- Cura_FanSensorRef fanSensor;
- Cura_FanSensorRef_Init(&fanSensor, _cb, ns);
- Cura_FanSensorRef_Set_CreationClassName(&fanSensor, "Cura_FanSensor");
- Cura_FanSensorRef_Set_DeviceID(&fanSensor, sptr->device_id);
- Cura_FanSensorRef_Set_SystemCreationClassName(&fanSensor, get_system_creation_class_name());
- Cura_FanSensorRef_Set_SystemName(&fanSensor, get_system_name());
+ LMI_FanSensorRef fanSensor;
+ LMI_FanSensorRef_Init(&fanSensor, _cb, ns);
+ LMI_FanSensorRef_Set_CreationClassName(&fanSensor, "LMI_FanSensor");
+ LMI_FanSensorRef_Set_DeviceID(&fanSensor, sptr->device_id);
+ LMI_FanSensorRef_Set_SystemCreationClassName(&fanSensor, get_system_creation_class_name());
+ LMI_FanSensorRef_Set_SystemName(&fanSensor, get_system_name());
- Cura_FanAssociatedSensor_Set_Antecedent(&w, &fanSensor);
- Cura_FanAssociatedSensor_Set_Dependent(&w, &fan);
+ LMI_FanAssociatedSensor_Set_Antecedent(&w, &fanSensor);
+ LMI_FanAssociatedSensor_Set_Dependent(&w, &fan);
KReturnInstance(cr, w);
lptr = lptr->next;
@@ -91,7 +91,7 @@ static CMPIStatus Cura_FanAssociatedSensorEnumInstances(
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Cura_FanAssociatedSensorGetInstance(
+static CMPIStatus LMI_FanAssociatedSensorGetInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -102,7 +102,7 @@ static CMPIStatus Cura_FanAssociatedSensorGetInstance(
_cb, mi, cc, cr, cop, properties);
}
-static CMPIStatus Cura_FanAssociatedSensorCreateInstance(
+static CMPIStatus LMI_FanAssociatedSensorCreateInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -112,7 +112,7 @@ static CMPIStatus Cura_FanAssociatedSensorCreateInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Cura_FanAssociatedSensorModifyInstance(
+static CMPIStatus LMI_FanAssociatedSensorModifyInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -123,7 +123,7 @@ static CMPIStatus Cura_FanAssociatedSensorModifyInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Cura_FanAssociatedSensorDeleteInstance(
+static CMPIStatus LMI_FanAssociatedSensorDeleteInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -132,7 +132,7 @@ static CMPIStatus Cura_FanAssociatedSensorDeleteInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Cura_FanAssociatedSensorExecQuery(
+static CMPIStatus LMI_FanAssociatedSensorExecQuery(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -143,7 +143,7 @@ static CMPIStatus Cura_FanAssociatedSensorExecQuery(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Cura_FanAssociatedSensorAssociationCleanup(
+static CMPIStatus LMI_FanAssociatedSensorAssociationCleanup(
CMPIAssociationMI* mi,
const CMPIContext* cc,
CMPIBoolean term)
@@ -151,7 +151,7 @@ static CMPIStatus Cura_FanAssociatedSensorAssociationCleanup(
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Cura_FanAssociatedSensorAssociators(
+static CMPIStatus LMI_FanAssociatedSensorAssociators(
CMPIAssociationMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -168,7 +168,7 @@ static CMPIStatus Cura_FanAssociatedSensorAssociators(
cc,
cr,
cop,
- Cura_FanAssociatedSensor_ClassName,
+ LMI_FanAssociatedSensor_ClassName,
assocClass,
resultClass,
role,
@@ -176,7 +176,7 @@ static CMPIStatus Cura_FanAssociatedSensorAssociators(
properties);
}
-static CMPIStatus Cura_FanAssociatedSensorAssociatorNames(
+static CMPIStatus LMI_FanAssociatedSensorAssociatorNames(
CMPIAssociationMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -192,14 +192,14 @@ static CMPIStatus Cura_FanAssociatedSensorAssociatorNames(
cc,
cr,
cop,
- Cura_FanAssociatedSensor_ClassName,
+ LMI_FanAssociatedSensor_ClassName,
assocClass,
resultClass,
role,
resultRole);
}
-static CMPIStatus Cura_FanAssociatedSensorReferences(
+static CMPIStatus LMI_FanAssociatedSensorReferences(
CMPIAssociationMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -214,13 +214,13 @@ static CMPIStatus Cura_FanAssociatedSensorReferences(
cc,
cr,
cop,
- Cura_FanAssociatedSensor_ClassName,
+ LMI_FanAssociatedSensor_ClassName,
assocClass,
role,
properties);
}
-static CMPIStatus Cura_FanAssociatedSensorReferenceNames(
+static CMPIStatus LMI_FanAssociatedSensorReferenceNames(
CMPIAssociationMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -234,25 +234,25 @@ static CMPIStatus Cura_FanAssociatedSensorReferenceNames(
cc,
cr,
cop,
- Cura_FanAssociatedSensor_ClassName,
+ LMI_FanAssociatedSensor_ClassName,
assocClass,
role);
}
CMInstanceMIStub(
- Cura_FanAssociatedSensor,
- Cura_FanAssociatedSensor,
+ LMI_FanAssociatedSensor,
+ LMI_FanAssociatedSensor,
_cb,
- Cura_FanAssociatedSensorInitialize())
+ LMI_FanAssociatedSensorInitialize())
CMAssociationMIStub(
- Cura_FanAssociatedSensor,
- Cura_FanAssociatedSensor,
+ LMI_FanAssociatedSensor,
+ LMI_FanAssociatedSensor,
_cb,
- Cura_FanAssociatedSensorInitialize())
+ LMI_FanAssociatedSensorInitialize())
KONKRET_REGISTRATION(
"root/cimv2",
- "Cura_FanAssociatedSensor",
- "Cura_FanAssociatedSensor",
+ "LMI_FanAssociatedSensor",
+ "LMI_FanAssociatedSensor",
"instance association")
diff --git a/src/fan/Cura_FanProvider.c b/src/fan/LMI_FanProvider.c
index cc9e13c..e6d8959 100644
--- a/src/fan/Cura_FanProvider.c
+++ b/src/fan/LMI_FanProvider.c
@@ -18,7 +18,7 @@
#include <konkret/konkret.h>
#include <stdint.h>
-#include "Cura_Fan.h"
+#include "LMI_Fan.h"
#include "globals.h"
#include "fan.h"
static const CMPIBroker* _cb = NULL;
@@ -44,13 +44,13 @@ void print_backtrace(int signal)
}
}
-static void Cura_FanInitialize()
+static void LMI_FanInitialize()
{
init_linux_fan_module();
signal(SIGSEGV, print_backtrace);
}
-static CMPIStatus Cura_FanCleanup(
+static CMPIStatus LMI_FanCleanup(
CMPIInstanceMI* mi,
const CMPIContext* cc,
CMPIBoolean term)
@@ -58,7 +58,7 @@ static CMPIStatus Cura_FanCleanup(
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Cura_FanEnumInstanceNames(
+static CMPIStatus LMI_FanEnumInstanceNames(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -68,7 +68,7 @@ static CMPIStatus Cura_FanEnumInstanceNames(
_cb, mi, cc, cr, cop);
}
-static CMPIStatus Cura_FanEnumInstances(
+static CMPIStatus LMI_FanEnumInstances(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -90,30 +90,30 @@ static CMPIStatus Cura_FanEnumInstances(
lptr = fans;
while (lptr != NULL) {
sptr = lptr->f;
- Cura_Fan w;
- Cura_Fan_Init(&w, _cb, ns);
- Cura_Fan_Set_CreationClassName(&w, "Cura_Fan");
- Cura_Fan_Set_SystemCreationClassName(&w, get_system_creation_class_name());
- Cura_Fan_Set_SystemName(&w, get_system_name());
- Cura_Fan_Set_DeviceID(&w, sptr->device_id);
-
- Cura_Fan_Set_Caption(&w, "Computer's fan");
- Cura_Fan_Set_Description(&w,"Computer's fan.");
+ LMI_Fan w;
+ LMI_Fan_Init(&w, _cb, ns);
+ LMI_Fan_Set_CreationClassName(&w, "LMI_Fan");
+ LMI_Fan_Set_SystemCreationClassName(&w, get_system_creation_class_name());
+ LMI_Fan_Set_SystemName(&w, get_system_name());
+ LMI_Fan_Set_DeviceID(&w, sptr->device_id);
+
+ 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);
- Cura_Fan_Set_ElementName(&w, buf);
+ LMI_Fan_Set_ElementName(&w, buf);
// ManagedSystemElement
- Cura_Fan_Set_Name(&w, sptr->name);
- Cura_Fan_Init_OperationalStatus(&w, 2);
- Cura_Fan_Set_OperationalStatus(&w, 0, sptr->fault ?
- Cura_Fan_OperationalStatus_Error :
- Cura_Fan_OperationalStatus_OK);
+ LMI_Fan_Set_Name(&w, sptr->name);
+ LMI_Fan_Init_OperationalStatus(&w, 2);
+ LMI_Fan_Set_OperationalStatus(&w, 0, sptr->fault ?
+ LMI_Fan_OperationalStatus_Error :
+ LMI_Fan_OperationalStatus_OK);
if (sptr->alarm || sptr->alarm_min || sptr->alarm_max) {
- Cura_Fan_Set_OperationalStatus(&w, 1, Cura_Fan_OperationalStatus_Stressed);
+ LMI_Fan_Set_OperationalStatus(&w, 1, LMI_Fan_OperationalStatus_Stressed);
}
- Cura_Fan_Init_StatusDescriptions(&w, 2);
- Cura_Fan_Set_StatusDescriptions(&w, 0, sptr->fault ?
+ LMI_Fan_Init_StatusDescriptions(&w, 2);
+ LMI_Fan_Set_StatusDescriptions(&w, 0, sptr->fault ?
"Chip indicates, that fan is in fault state."
" Possible causes are open diodes, unconnected fan etc."
" Thus the measurement for this channel should not be trusted."
@@ -124,66 +124,66 @@ static CMPIStatus Cura_FanEnumInstances(
sptr->alarm ? "1":"0",
sptr->alarm_min ? "1":"0",
sptr->alarm_max ? "1":"0");
- Cura_Fan_Set_StatusDescriptions(&w, 1, buf);
+ LMI_Fan_Set_StatusDescriptions(&w, 1, buf);
}
- Cura_Fan_Set_HealthState(&w, sptr->fault ?
- Cura_Fan_HealthState_Major_failure :
- Cura_Fan_HealthState_OK);
+ LMI_Fan_Set_HealthState(&w, sptr->fault ?
+ LMI_Fan_HealthState_Major_failure :
+ LMI_Fan_HealthState_OK);
- Cura_Fan_Set_OperatingStatus(&w, sptr->fault ?
- Cura_Fan_OperatingStatus_Stopped :
- Cura_Fan_OperatingStatus_In_Service);
+ LMI_Fan_Set_OperatingStatus(&w, sptr->fault ?
+ LMI_Fan_OperatingStatus_Stopped :
+ LMI_Fan_OperatingStatus_In_Service);
- Cura_Fan_Set_PrimaryStatus(&w, sptr->fault ?
- Cura_Fan_PrimaryStatus_Error :
- Cura_Fan_PrimaryStatus_OK);
+ LMI_Fan_Set_PrimaryStatus(&w, sptr->fault ?
+ LMI_Fan_PrimaryStatus_Error :
+ LMI_Fan_PrimaryStatus_OK);
// EnabledLogicalElement
- Cura_Fan_Init_OtherIdentifyingInfo(&w, 2);
- Cura_Fan_Set_OtherIdentifyingInfo(&w, 0, sptr->chip_name);
- Cura_Fan_Set_OtherIdentifyingInfo(&w, 1, sptr->sys_path);
+ LMI_Fan_Init_OtherIdentifyingInfo(&w, 2);
+ LMI_Fan_Set_OtherIdentifyingInfo(&w, 0, sptr->chip_name);
+ LMI_Fan_Set_OtherIdentifyingInfo(&w, 1, sptr->sys_path);
- Cura_Fan_Init_IdentifyingDescriptions(&w, 2);
- Cura_Fan_Set_IdentifyingDescriptions(&w, 0, "ChipName - name of fan's chip.");
- Cura_Fan_Set_IdentifyingDescriptions(&w, 1, "SysPath - system path of fan's chip.");
+ LMI_Fan_Init_IdentifyingDescriptions(&w, 2);
+ LMI_Fan_Set_IdentifyingDescriptions(&w, 0, "ChipName - name of fan's chip.");
+ LMI_Fan_Set_IdentifyingDescriptions(&w, 1, "SysPath - system path of fan's chip.");
- Cura_Fan_Set_ActiveCooling(&w, true);
+ LMI_Fan_Set_ActiveCooling(&w, true);
uint32_t i = 1;
int index = 0;
debug("accessible_features: %d", sptr->accessible_features);
- Cura_Fan_Init_AccessibleFeatures(&w, 8);
+ LMI_Fan_Init_AccessibleFeatures(&w, 8);
while (i <= CIM_FAN_AF_FEATURE_MAX) {
if (i & sptr->accessible_features) {
- Cura_Fan_Set_AccessibleFeatures(&w, index++, i);
+ LMI_Fan_Set_AccessibleFeatures(&w, index++, i);
}
i = i << 1;
}
if (sptr->accessible_features & CIM_FAN_AF_MIN_SPEED) {
- Cura_Fan_Set_MinSpeed(&w, (uint64_t) sptr->min_speed);
+ LMI_Fan_Set_MinSpeed(&w, (uint64_t) sptr->min_speed);
}
if (sptr->accessible_features & CIM_FAN_AF_MAX_SPEED) {
- Cura_Fan_Set_MaxSpeed(&w, (uint64_t) sptr->max_speed);
+ LMI_Fan_Set_MaxSpeed(&w, (uint64_t) sptr->max_speed);
}
if (sptr->accessible_features & CIM_FAN_AF_DIV) {
- Cura_Fan_Set_Divisor(&w, sptr->divisor);
+ LMI_Fan_Set_Divisor(&w, sptr->divisor);
}
if (sptr->accessible_features & CIM_FAN_AF_PULSES) {
- Cura_Fan_Set_Pulses(&w, sptr->pulses);
+ LMI_Fan_Set_Pulses(&w, sptr->pulses);
}
if (sptr->accessible_features & CIM_FAN_AF_BEEP) {
- Cura_Fan_Set_Beep(&w, sptr->beep);
+ LMI_Fan_Set_Beep(&w, sptr->beep);
}
if (sptr->accessible_features & CIM_FAN_AF_ALARM) {
- Cura_Fan_Set_Alarm(&w, sptr->alarm);
+ LMI_Fan_Set_Alarm(&w, sptr->alarm);
}
if (sptr->accessible_features & CIM_FAN_AF_ALARM_MIN) {
- Cura_Fan_Set_MinAlarm(&w, sptr->alarm_min);
+ LMI_Fan_Set_MinAlarm(&w, sptr->alarm_min);
}
if (sptr->accessible_features & CIM_FAN_AF_ALARM_MAX) {
- Cura_Fan_Set_MaxAlarm(&w, sptr->alarm_max);
+ LMI_Fan_Set_MaxAlarm(&w, sptr->alarm_max);
}
KReturnInstance(cr, w);
@@ -193,7 +193,7 @@ static CMPIStatus Cura_FanEnumInstances(
KReturn(OK);
}
-static CMPIStatus Cura_FanGetInstance(
+static CMPIStatus LMI_FanGetInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -204,7 +204,7 @@ static CMPIStatus Cura_FanGetInstance(
_cb, mi, cc, cr, cop, properties);
}
-static CMPIStatus Cura_FanCreateInstance(
+static CMPIStatus LMI_FanCreateInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -214,7 +214,7 @@ static CMPIStatus Cura_FanCreateInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Cura_FanModifyInstance(
+static CMPIStatus LMI_FanModifyInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -225,7 +225,7 @@ static CMPIStatus Cura_FanModifyInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Cura_FanDeleteInstance(
+static CMPIStatus LMI_FanDeleteInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -234,7 +234,7 @@ static CMPIStatus Cura_FanDeleteInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Cura_FanExecQuery(
+static CMPIStatus LMI_FanExecQuery(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -246,12 +246,12 @@ static CMPIStatus Cura_FanExecQuery(
}
CMInstanceMIStub(
- Cura_Fan,
- Cura_Fan,
+ LMI_Fan,
+ LMI_Fan,
_cb,
- Cura_FanInitialize())
+ LMI_FanInitialize())
-static CMPIStatus Cura_FanMethodCleanup(
+static CMPIStatus LMI_FanMethodCleanup(
CMPIMethodMI* mi,
const CMPIContext* cc,
CMPIBoolean term)
@@ -259,7 +259,7 @@ static CMPIStatus Cura_FanMethodCleanup(
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Cura_FanInvokeMethod(
+static CMPIStatus LMI_FanInvokeMethod(
CMPIMethodMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -268,21 +268,21 @@ static CMPIStatus Cura_FanInvokeMethod(
const CMPIArgs* in,
CMPIArgs* out)
{
- return Cura_Fan_DispatchMethod(
+ return LMI_Fan_DispatchMethod(
_cb, mi, cc, cr, cop, meth, in, out);
}
CMMethodMIStub(
- Cura_Fan,
- Cura_Fan,
+ LMI_Fan,
+ LMI_Fan,
_cb,
- Cura_FanInitialize())
+ LMI_FanInitialize())
-KUint32 Cura_Fan_RequestStateChange(
+KUint32 LMI_Fan_RequestStateChange(
const CMPIBroker* cb,
CMPIMethodMI* mi,
const CMPIContext* context,
- const Cura_FanRef* self,
+ const LMI_FanRef* self,
const KUint16* RequestedState,
KRef* Job,
const KDateTime* TimeoutPeriod,
@@ -294,11 +294,11 @@ KUint32 Cura_Fan_RequestStateChange(
return result;
}
-KUint32 Cura_Fan_SetPowerState(
+KUint32 LMI_Fan_SetPowerState(
const CMPIBroker* cb,
CMPIMethodMI* mi,
const CMPIContext* context,
- const Cura_FanRef* self,
+ const LMI_FanRef* self,
const KUint16* PowerState,
const KDateTime* Time,
CMPIStatus* status)
@@ -309,11 +309,11 @@ KUint32 Cura_Fan_SetPowerState(
return result;
}
-KUint32 Cura_Fan_Reset(
+KUint32 LMI_Fan_Reset(
const CMPIBroker* cb,
CMPIMethodMI* mi,
const CMPIContext* context,
- const Cura_FanRef* self,
+ const LMI_FanRef* self,
CMPIStatus* status)
{
KUint32 result = KUINT32_INIT;
@@ -322,11 +322,11 @@ KUint32 Cura_Fan_Reset(
return result;
}
-KUint32 Cura_Fan_EnableDevice(
+KUint32 LMI_Fan_EnableDevice(
const CMPIBroker* cb,
CMPIMethodMI* mi,
const CMPIContext* context,
- const Cura_FanRef* self,
+ const LMI_FanRef* self,
const KBoolean* Enabled,
CMPIStatus* status)
{
@@ -336,11 +336,11 @@ KUint32 Cura_Fan_EnableDevice(
return result;
}
-KUint32 Cura_Fan_OnlineDevice(
+KUint32 LMI_Fan_OnlineDevice(
const CMPIBroker* cb,
CMPIMethodMI* mi,
const CMPIContext* context,
- const Cura_FanRef* self,
+ const LMI_FanRef* self,
const KBoolean* Online,
CMPIStatus* status)
{
@@ -350,11 +350,11 @@ KUint32 Cura_Fan_OnlineDevice(
return result;
}
-KUint32 Cura_Fan_QuiesceDevice(
+KUint32 LMI_Fan_QuiesceDevice(
const CMPIBroker* cb,
CMPIMethodMI* mi,
const CMPIContext* context,
- const Cura_FanRef* self,
+ const LMI_FanRef* self,
const KBoolean* Quiesce,
CMPIStatus* status)
{
@@ -364,11 +364,11 @@ KUint32 Cura_Fan_QuiesceDevice(
return result;
}
-KUint32 Cura_Fan_SaveProperties(
+KUint32 LMI_Fan_SaveProperties(
const CMPIBroker* cb,
CMPIMethodMI* mi,
const CMPIContext* context,
- const Cura_FanRef* self,
+ const LMI_FanRef* self,
CMPIStatus* status)
{
KUint32 result = KUINT32_INIT;
@@ -377,11 +377,11 @@ KUint32 Cura_Fan_SaveProperties(
return result;
}
-KUint32 Cura_Fan_RestoreProperties(
+KUint32 LMI_Fan_RestoreProperties(
const CMPIBroker* cb,
CMPIMethodMI* mi,
const CMPIContext* context,
- const Cura_FanRef* self,
+ const LMI_FanRef* self,
CMPIStatus* status)
{
KUint32 result = KUINT32_INIT;
@@ -390,11 +390,11 @@ KUint32 Cura_Fan_RestoreProperties(
return result;
}
-KUint32 Cura_Fan_SetSpeed(
+KUint32 LMI_Fan_SetSpeed(
const CMPIBroker* cb,
CMPIMethodMI* mi,
const CMPIContext* context,
- const Cura_FanRef* self,
+ const LMI_FanRef* self,
const KUint64* DesiredSpeed,
CMPIStatus* status)
{
@@ -406,6 +406,6 @@ KUint32 Cura_Fan_SetSpeed(
KONKRET_REGISTRATION(
"root/cimv2",
- "Cura_Fan",
- "Cura_Fan",
+ "LMI_Fan",
+ "LMI_Fan",
"instance method")
diff --git a/src/fan/Cura_FanSensorProvider.c b/src/fan/LMI_FanSensorProvider.c
index 2965bf5..5ede6fb 100644
--- a/src/fan/Cura_FanSensorProvider.c
+++ b/src/fan/LMI_FanSensorProvider.c
@@ -17,18 +17,18 @@
*/
#include <konkret/konkret.h>
-#include "Cura_FanSensor.h"
+#include "LMI_FanSensor.h"
#include "fan.h"
#include <globals.h>
static const CMPIBroker* _cb = NULL;
-static void Cura_FanSensorInitialize()
+static void LMI_FanSensorInitialize()
{
init_linux_fan_module();
}
-static CMPIStatus Cura_FanSensorCleanup(
+static CMPIStatus LMI_FanSensorCleanup(
CMPIInstanceMI* mi,
const CMPIContext* cc,
CMPIBoolean term)
@@ -36,7 +36,7 @@ static CMPIStatus Cura_FanSensorCleanup(
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Cura_FanSensorEnumInstanceNames(
+static CMPIStatus LMI_FanSensorEnumInstanceNames(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -46,7 +46,7 @@ static CMPIStatus Cura_FanSensorEnumInstanceNames(
_cb, mi, cc, cr, cop);
}
-static CMPIStatus Cura_FanSensorEnumInstances(
+static CMPIStatus LMI_FanSensorEnumInstances(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -64,31 +64,31 @@ static CMPIStatus Cura_FanSensorEnumInstances(
// iterate fan list
while (lptr) {
sptr = lptr->f;
- Cura_FanSensor w;
- Cura_FanSensor_Init(&w, _cb, KNameSpace(cop));
- Cura_FanSensor_Set_CreationClassName(&w, "Cura_FanSensor");
- Cura_FanSensor_Set_SystemCreationClassName(&w, get_system_creation_class_name());
- Cura_FanSensor_Set_SystemName(&w, get_system_name());
- Cura_FanSensor_Set_DeviceID(&w, sptr->device_id);
-
- Cura_FanSensor_Set_Caption(&w, "Computer's fan");
- Cura_FanSensor_Set_Description(&w,"Computer's fan.");
+ LMI_FanSensor w;
+ LMI_FanSensor_Init(&w, _cb, KNameSpace(cop));
+ LMI_FanSensor_Set_CreationClassName(&w, "LMI_FanSensor");
+ LMI_FanSensor_Set_SystemCreationClassName(&w, get_system_creation_class_name());
+ LMI_FanSensor_Set_SystemName(&w, get_system_name());
+ LMI_FanSensor_Set_DeviceID(&w, sptr->device_id);
+
+ LMI_FanSensor_Set_Caption(&w, "Computer's fan");
+ LMI_FanSensor_Set_Description(&w,"Computer's fan.");
snprintf(buf, 200, "Fan \"%s\" on chip \"%s\"", sptr->name, sptr->chip_name);
- Cura_FanSensor_Set_ElementName(&w, buf);
+ LMI_FanSensor_Set_ElementName(&w, buf);
// ManagedSystemElement
- Cura_FanSensor_Set_Name(&w, sptr->name);
+ LMI_FanSensor_Set_Name(&w, sptr->name);
- Cura_FanSensor_Init_OperationalStatus(&w, 2);
- Cura_FanSensor_Set_OperationalStatus(&w, 0, sptr->fault ?
- Cura_FanSensor_OperationalStatus_Error :
- Cura_FanSensor_OperationalStatus_OK);
+ LMI_FanSensor_Init_OperationalStatus(&w, 2);
+ LMI_FanSensor_Set_OperationalStatus(&w, 0, sptr->fault ?
+ LMI_FanSensor_OperationalStatus_Error :
+ LMI_FanSensor_OperationalStatus_OK);
if (sptr->alarm || sptr->alarm_min || sptr->alarm_max) {
- Cura_FanSensor_Set_OperationalStatus(&w, 1, Cura_FanSensor_OperationalStatus_Stressed);
+ LMI_FanSensor_Set_OperationalStatus(&w, 1, LMI_FanSensor_OperationalStatus_Stressed);
}
- Cura_FanSensor_Init_StatusDescriptions(&w, 2);
- Cura_FanSensor_Set_StatusDescriptions(&w, 0, sptr->fault ?
+ LMI_FanSensor_Init_StatusDescriptions(&w, 2);
+ LMI_FanSensor_Set_StatusDescriptions(&w, 0, sptr->fault ?
"Chip indicates, that fan is in fault state."
" Possible causes are open diodes, unconnected fan etc."
" Thus the measurement for this channel should not be trusted."
@@ -99,66 +99,66 @@ static CMPIStatus Cura_FanSensorEnumInstances(
sptr->alarm ? "1":"0",
sptr->alarm_min ? "1":"0",
sptr->alarm_max ? "1":"0");
- Cura_FanSensor_Set_StatusDescriptions(&w, 1, buf);
+ LMI_FanSensor_Set_StatusDescriptions(&w, 1, buf);
}
- Cura_FanSensor_Set_HealthState(&w, sptr->fault ?
- Cura_FanSensor_HealthState_Major_failure :
- Cura_FanSensor_HealthState_OK);
+ LMI_FanSensor_Set_HealthState(&w, sptr->fault ?
+ LMI_FanSensor_HealthState_Major_failure :
+ LMI_FanSensor_HealthState_OK);
- Cura_FanSensor_Set_OperatingStatus(&w, sptr->fault ?
- Cura_FanSensor_OperatingStatus_Stopped :
- Cura_FanSensor_OperatingStatus_In_Service);
+ LMI_FanSensor_Set_OperatingStatus(&w, sptr->fault ?
+ LMI_FanSensor_OperatingStatus_Stopped :
+ LMI_FanSensor_OperatingStatus_In_Service);
- Cura_FanSensor_Set_PrimaryStatus(&w, sptr->fault ?
- Cura_FanSensor_PrimaryStatus_Error :
- Cura_FanSensor_PrimaryStatus_OK);
+ LMI_FanSensor_Set_PrimaryStatus(&w, sptr->fault ?
+ LMI_FanSensor_PrimaryStatus_Error :
+ LMI_FanSensor_PrimaryStatus_OK);
// EnabledLogicalElement
- Cura_FanSensor_Init_OtherIdentifyingInfo(&w, 2);
- Cura_FanSensor_Set_OtherIdentifyingInfo(&w, 0, sptr->chip_name);
- Cura_FanSensor_Set_OtherIdentifyingInfo(&w, 1, sptr->sys_path);
+ LMI_FanSensor_Init_OtherIdentifyingInfo(&w, 2);
+ LMI_FanSensor_Set_OtherIdentifyingInfo(&w, 0, sptr->chip_name);
+ LMI_FanSensor_Set_OtherIdentifyingInfo(&w, 1, sptr->sys_path);
- Cura_FanSensor_Init_IdentifyingDescriptions(&w, 2);
- Cura_FanSensor_Set_IdentifyingDescriptions(&w, 0, "ChipName - name of fan's chip.");
- Cura_FanSensor_Set_IdentifyingDescriptions(&w, 1, "SysPath - system path of fan's chip.");
+ LMI_FanSensor_Init_IdentifyingDescriptions(&w, 2);
+ LMI_FanSensor_Set_IdentifyingDescriptions(&w, 0, "ChipName - name of fan's chip.");
+ LMI_FanSensor_Set_IdentifyingDescriptions(&w, 1, "SysPath - system path of fan's chip.");
// ManagedElement
- Cura_FanSensor_Set_Caption(&w, "Fan's tachometer");
- Cura_FanSensor_Set_Description(&w,"Associated sensor of fan. Giving information about its speed.");
+ LMI_FanSensor_Set_Caption(&w, "Fan's tachometer");
+ LMI_FanSensor_Set_Description(&w,"Associated sensor of fan. Giving information about its speed.");
snprintf(buf, 200, "Tachometer of fan \"%s\" on chip \"%s\"", sptr->name, sptr->chip_name);
- Cura_FanSensor_Set_ElementName(&w, buf);
+ LMI_FanSensor_Set_ElementName(&w, buf);
// Sensor
- Cura_FanSensor_Set_SensorType(&w, Cura_FanSensor_SensorType_Tachometer);
- Cura_FanSensor_Set_CurrentState(&w, fan_get_current_state(sptr));
+ LMI_FanSensor_Set_SensorType(&w, LMI_FanSensor_SensorType_Tachometer);
+ LMI_FanSensor_Set_CurrentState(&w, fan_get_current_state(sptr));
- Cura_FanSensor_Init_PossibleStates(&w, 5);
+ LMI_FanSensor_Init_PossibleStates(&w, 5);
int index = 0;
if (sptr->accessible_features & CIM_FAN_AF_MIN_SPEED) {
- Cura_FanSensor_Set_PossibleStates(&w, index++, "Below Minimum");
- Cura_FanSensor_Set_PossibleStates(&w, index++, "At Minimum");
+ LMI_FanSensor_Set_PossibleStates(&w, index++, "Below Minimum");
+ LMI_FanSensor_Set_PossibleStates(&w, index++, "At Minimum");
}
- Cura_FanSensor_Set_PossibleStates(&w, index++, "Normal");
+ LMI_FanSensor_Set_PossibleStates(&w, index++, "Normal");
if (sptr->accessible_features & CIM_FAN_AF_MAX_SPEED) {
- Cura_FanSensor_Set_PossibleStates(&w, index++, "At Maximum");
- Cura_FanSensor_Set_PossibleStates(&w, index++, "Above Maximum");
+ LMI_FanSensor_Set_PossibleStates(&w, index++, "At Maximum");
+ LMI_FanSensor_Set_PossibleStates(&w, index++, "Above Maximum");
}
// NumericSensor
- Cura_FanSensor_Set_BaseUnits(&w, Cura_FanSensor_BaseUnits_Revolutions);
- Cura_FanSensor_Set_UnitModifier(&w, 0);
- Cura_FanSensor_Set_RateUnits(&w, Cura_FanSensor_RateUnits_Per_Minute);
- Cura_FanSensor_Set_CurrentReading(&w, sptr->speed);
+ LMI_FanSensor_Set_BaseUnits(&w, LMI_FanSensor_BaseUnits_Revolutions);
+ LMI_FanSensor_Set_UnitModifier(&w, 0);
+ LMI_FanSensor_Set_RateUnits(&w, LMI_FanSensor_RateUnits_Per_Minute);
+ LMI_FanSensor_Set_CurrentReading(&w, sptr->speed);
if (sptr->accessible_features & CIM_FAN_AF_MAX_SPEED) {
- Cura_FanSensor_Set_NormalMax(&w, sptr->max_speed);
+ LMI_FanSensor_Set_NormalMax(&w, sptr->max_speed);
}
if (sptr->accessible_features & CIM_FAN_AF_MIN_SPEED) {
- Cura_FanSensor_Set_NormalMin(&w, sptr->min_speed);
+ LMI_FanSensor_Set_NormalMin(&w, sptr->min_speed);
}
- Cura_FanSensor_Set_MinReadable(&w, 0);
- Cura_FanSensor_Set_IsLinear(&w, true);
+ LMI_FanSensor_Set_MinReadable(&w, 0);
+ LMI_FanSensor_Set_IsLinear(&w, true);
KReturnInstance(cr, w);
lptr = lptr->next;
@@ -166,7 +166,7 @@ static CMPIStatus Cura_FanSensorEnumInstances(
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Cura_FanSensorGetInstance(
+static CMPIStatus LMI_FanSensorGetInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -177,7 +177,7 @@ static CMPIStatus Cura_FanSensorGetInstance(
_cb, mi, cc, cr, cop, properties);
}
-static CMPIStatus Cura_FanSensorCreateInstance(
+static CMPIStatus LMI_FanSensorCreateInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -187,7 +187,7 @@ static CMPIStatus Cura_FanSensorCreateInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Cura_FanSensorModifyInstance(
+static CMPIStatus LMI_FanSensorModifyInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -198,7 +198,7 @@ static CMPIStatus Cura_FanSensorModifyInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Cura_FanSensorDeleteInstance(
+static CMPIStatus LMI_FanSensorDeleteInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -207,7 +207,7 @@ static CMPIStatus Cura_FanSensorDeleteInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Cura_FanSensorExecQuery(
+static CMPIStatus LMI_FanSensorExecQuery(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -219,12 +219,12 @@ static CMPIStatus Cura_FanSensorExecQuery(
}
CMInstanceMIStub(
- Cura_FanSensor,
- Cura_FanSensor,
+ LMI_FanSensor,
+ LMI_FanSensor,
_cb,
- Cura_FanSensorInitialize())
+ LMI_FanSensorInitialize())
-static CMPIStatus Cura_FanSensorMethodCleanup(
+static CMPIStatus LMI_FanSensorMethodCleanup(
CMPIMethodMI* mi,
const CMPIContext* cc,
CMPIBoolean term)
@@ -232,7 +232,7 @@ static CMPIStatus Cura_FanSensorMethodCleanup(
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Cura_FanSensorInvokeMethod(
+static CMPIStatus LMI_FanSensorInvokeMethod(
CMPIMethodMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -241,21 +241,21 @@ static CMPIStatus Cura_FanSensorInvokeMethod(
const CMPIArgs* in,
CMPIArgs* out)
{
- return Cura_FanSensor_DispatchMethod(
+ return LMI_FanSensor_DispatchMethod(
_cb, mi, cc, cr, cop, meth, in, out);
}
CMMethodMIStub(
- Cura_FanSensor,
- Cura_FanSensor,
+ LMI_FanSensor,
+ LMI_FanSensor,
_cb,
- Cura_FanSensorInitialize())
+ LMI_FanSensorInitialize())
-KUint32 Cura_FanSensor_RequestStateChange(
+KUint32 LMI_FanSensor_RequestStateChange(
const CMPIBroker* cb,
CMPIMethodMI* mi,
const CMPIContext* context,
- const Cura_FanSensorRef* self,
+ const LMI_FanSensorRef* self,
const KUint16* RequestedState,
KRef* Job,
const KDateTime* TimeoutPeriod,
@@ -267,11 +267,11 @@ KUint32 Cura_FanSensor_RequestStateChange(
return result;
}
-KUint32 Cura_FanSensor_SetPowerState(
+KUint32 LMI_FanSensor_SetPowerState(
const CMPIBroker* cb,
CMPIMethodMI* mi,
const CMPIContext* context,
- const Cura_FanSensorRef* self,
+ const LMI_FanSensorRef* self,
const KUint16* PowerState,
const KDateTime* Time,
CMPIStatus* status)
@@ -282,11 +282,11 @@ KUint32 Cura_FanSensor_SetPowerState(
return result;
}
-KUint32 Cura_FanSensor_Reset(
+KUint32 LMI_FanSensor_Reset(
const CMPIBroker* cb,
CMPIMethodMI* mi,
const CMPIContext* context,
- const Cura_FanSensorRef* self,
+ const LMI_FanSensorRef* self,
CMPIStatus* status)
{
KUint32 result = KUINT32_INIT;
@@ -295,11 +295,11 @@ KUint32 Cura_FanSensor_Reset(
return result;
}
-KUint32 Cura_FanSensor_EnableDevice(
+KUint32 LMI_FanSensor_EnableDevice(
const CMPIBroker* cb,
CMPIMethodMI* mi,
const CMPIContext* context,
- const Cura_FanSensorRef* self,
+ const LMI_FanSensorRef* self,
const KBoolean* Enabled,
CMPIStatus* status)
{
@@ -309,11 +309,11 @@ KUint32 Cura_FanSensor_EnableDevice(
return result;
}
-KUint32 Cura_FanSensor_OnlineDevice(
+KUint32 LMI_FanSensor_OnlineDevice(
const CMPIBroker* cb,
CMPIMethodMI* mi,
const CMPIContext* context,
- const Cura_FanSensorRef* self,
+ const LMI_FanSensorRef* self,
const KBoolean* Online,
CMPIStatus* status)
{
@@ -323,11 +323,11 @@ KUint32 Cura_FanSensor_OnlineDevice(
return result;
}
-KUint32 Cura_FanSensor_QuiesceDevice(
+KUint32 LMI_FanSensor_QuiesceDevice(
const CMPIBroker* cb,
CMPIMethodMI* mi,
const CMPIContext* context,
- const Cura_FanSensorRef* self,
+ const LMI_FanSensorRef* self,
const KBoolean* Quiesce,
CMPIStatus* status)
{
@@ -337,11 +337,11 @@ KUint32 Cura_FanSensor_QuiesceDevice(
return result;
}
-KUint32 Cura_FanSensor_SaveProperties(
+KUint32 LMI_FanSensor_SaveProperties(
const CMPIBroker* cb,
CMPIMethodMI* mi,
const CMPIContext* context,
- const Cura_FanSensorRef* self,
+ const LMI_FanSensorRef* self,
CMPIStatus* status)
{
KUint32 result = KUINT32_INIT;
@@ -350,11 +350,11 @@ KUint32 Cura_FanSensor_SaveProperties(
return result;
}
-KUint32 Cura_FanSensor_RestoreProperties(
+KUint32 LMI_FanSensor_RestoreProperties(
const CMPIBroker* cb,
CMPIMethodMI* mi,
const CMPIContext* context,
- const Cura_FanSensorRef* self,
+ const LMI_FanSensorRef* self,
CMPIStatus* status)
{
KUint32 result = KUINT32_INIT;
@@ -363,11 +363,11 @@ KUint32 Cura_FanSensor_RestoreProperties(
return result;
}
-KUint32 Cura_FanSensor_RestoreDefaultThresholds(
+KUint32 LMI_FanSensor_RestoreDefaultThresholds(
const CMPIBroker* cb,
CMPIMethodMI* mi,
const CMPIContext* context,
- const Cura_FanSensorRef* self,
+ const LMI_FanSensorRef* self,
CMPIStatus* status)
{
KUint32 result = KUINT32_INIT;
@@ -376,11 +376,11 @@ KUint32 Cura_FanSensor_RestoreDefaultThresholds(
return result;
}
-KUint32 Cura_FanSensor_GetNonLinearFactors(
+KUint32 LMI_FanSensor_GetNonLinearFactors(
const CMPIBroker* cb,
CMPIMethodMI* mi,
const CMPIContext* context,
- const Cura_FanSensorRef* self,
+ const LMI_FanSensorRef* self,
const KSint32* SensorReading,
KSint32* Accuracy,
KUint32* Resolution,
@@ -396,6 +396,6 @@ KUint32 Cura_FanSensor_GetNonLinearFactors(
KONKRET_REGISTRATION(
"root/cimv2",
- "Cura_FanSensor",
- "Cura_FanSensor",
+ "LMI_FanSensor",
+ "LMI_FanSensor",
"instance method")