summaryrefslogtreecommitdiffstats
path: root/src/power/Linux_AssociatedPowerManagementServiceProvider.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/power/Linux_AssociatedPowerManagementServiceProvider.c')
-rw-r--r--src/power/Linux_AssociatedPowerManagementServiceProvider.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/power/Linux_AssociatedPowerManagementServiceProvider.c b/src/power/Linux_AssociatedPowerManagementServiceProvider.c
index 75be7d2..8013d80 100644
--- a/src/power/Linux_AssociatedPowerManagementServiceProvider.c
+++ b/src/power/Linux_AssociatedPowerManagementServiceProvider.c
@@ -46,16 +46,19 @@ static CMPIStatus Linux_AssociatedPowerManagementServiceEnumInstances(
const CMPIObjectPath* cop,
const char** properties)
{
+ CMPIStatus rc;
const char *ns = KNameSpace(cop);
Linux_AssociatedPowerManagementService w;
Linux_AssociatedPowerManagementService_Init(&w, _cb, ns);
- Linux_ComputerSystemRef computerSystemRef;
- Linux_ComputerSystemRef_Init(&computerSystemRef, _cb, ns);
- Linux_ComputerSystemRef_Set_Name(&computerSystemRef, get_system_name());
- Linux_ComputerSystemRef_Set_CreationClassName(&computerSystemRef, "Linux_ComputerSystem");
- Linux_AssociatedPowerManagementService_Set_UserOfService(&w, &computerSystemRef);
+ CIM_ComputerSystemRef computerSystemRef;
+ CIM_ComputerSystemRef_Init(&computerSystemRef, _cb, ns);
+ CIM_ComputerSystemRef_Set_Name(&computerSystemRef, get_system_name());
+ CIM_ComputerSystemRef_Set_CreationClassName(&computerSystemRef, get_system_creationg_class_name());
+ CMPIObjectPath *computerSystemOP = CIM_ComputerSystemRef_ToObjectPath(&computerSystemRef, &rc);
+ computerSystemOP->ft->setClassName(computerSystemOP, get_system_creationg_class_name());
+ Linux_AssociatedPowerManagementService_SetObjectPath_UserOfService(&w, computerSystemOP);
Linux_PowerManagementServiceRef powerManagementServiceRef;
Linux_PowerManagementServiceRef_Init(&powerManagementServiceRef, _cb, ns);