summaryrefslogtreecommitdiffstats
path: root/src/fan/LMI_FanAssociatedSensorProvider.c
diff options
context:
space:
mode:
authorRadek Novacek <rnovacek@redhat.com>2013-10-30 15:51:12 +0100
committerRadek Novacek <rnovacek@redhat.com>2013-10-31 08:53:46 +0100
commit49394a84fe1235b692fc32d903bf3486e41f76b4 (patch)
treee702181ad69ea995e48ce103f1f3e2b90fa97597 /src/fan/LMI_FanAssociatedSensorProvider.c
parent793843369a4445f8602ef176b41c828730cb4404 (diff)
downloadopenlmi-providers-49394a84fe1235b692fc32d903bf3486e41f76b4.tar.gz
openlmi-providers-49394a84fe1235b692fc32d903bf3486e41f76b4.tar.xz
openlmi-providers-49394a84fe1235b692fc32d903bf3486e41f76b4.zip
Add lmi_get_computer_system function and fix lmi_get_system_name
PG_ComputerSystem has different method how to get hostname than our providers. In order to create the associations to this class we need to enumerate it. The downside is that all providers must supply CMPIContext to the lmi_init function. New function lmi_get_computer_system returns CMPIObjectPath to the configured CIM_ComputerSystem subclass instance. This object should be used in all references with ComputerSystem. Function lmi_get_system_name has been altered to return same value as ComputerSystem "Name" property.
Diffstat (limited to 'src/fan/LMI_FanAssociatedSensorProvider.c')
-rw-r--r--src/fan/LMI_FanAssociatedSensorProvider.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/fan/LMI_FanAssociatedSensorProvider.c b/src/fan/LMI_FanAssociatedSensorProvider.c
index a70adcb..63ca68f 100644
--- a/src/fan/LMI_FanAssociatedSensorProvider.c
+++ b/src/fan/LMI_FanAssociatedSensorProvider.c
@@ -25,9 +25,9 @@
static const CMPIBroker* _cb;
-static void LMI_FanAssociatedSensorInitialize()
+static void LMI_FanAssociatedSensorInitialize(const CMPIContext *ctx)
{
- lmi_init(provider_name, _cb, provider_config_defaults);
+ lmi_init(provider_name, _cb, ctx, provider_config_defaults);
init_linux_fan_module();
}
@@ -253,13 +253,13 @@ CMInstanceMIStub(
LMI_FanAssociatedSensor,
LMI_FanAssociatedSensor,
_cb,
- LMI_FanAssociatedSensorInitialize())
+ LMI_FanAssociatedSensorInitialize(ctx))
CMAssociationMIStub(
LMI_FanAssociatedSensor,
LMI_FanAssociatedSensor,
_cb,
- LMI_FanAssociatedSensorInitialize())
+ LMI_FanAssociatedSensorInitialize(ctx))
KONKRET_REGISTRATION(
"root/cimv2",