summaryrefslogtreecommitdiffstats
path: root/src/hardware/LMI_BatteryPhysicalPackageProvider.c
diff options
context:
space:
mode:
authorPeter Schiffer <pschiffe@redhat.com>2014-05-09 17:37:40 +0200
committerPeter Schiffer <pschiffe@redhat.com>2014-05-12 19:20:43 +0200
commit28aed3c2c360b84762f76b322e9fc80bd74c036b (patch)
tree880f68596cbaf7e0e020a6f116c3e789cd4fd60a /src/hardware/LMI_BatteryPhysicalPackageProvider.c
parent87a03ac7ebff779351e9782d40e691221195f8e0 (diff)
downloadopenlmi-providers-28aed3c2c360b84762f76b322e9fc80bd74c036b.tar.gz
openlmi-providers-28aed3c2c360b84762f76b322e9fc80bd74c036b.tar.xz
openlmi-providers-28aed3c2c360b84762f76b322e9fc80bd74c036b.zip
Hardware: spring cleanup & refactor
* use openlmi common library where possible * get rid of LMI_Hardware.h file * some other cosmetic changes
Diffstat (limited to 'src/hardware/LMI_BatteryPhysicalPackageProvider.c')
-rw-r--r--src/hardware/LMI_BatteryPhysicalPackageProvider.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/hardware/LMI_BatteryPhysicalPackageProvider.c b/src/hardware/LMI_BatteryPhysicalPackageProvider.c
index 7ff67da..72336b0 100644
--- a/src/hardware/LMI_BatteryPhysicalPackageProvider.c
+++ b/src/hardware/LMI_BatteryPhysicalPackageProvider.c
@@ -21,7 +21,7 @@
#include <time.h>
#include <konkret/konkret.h>
#include "LMI_BatteryPhysicalPackage.h"
-#include "LMI_Hardware.h"
+#include "utils.h"
#include "dmidecode.h"
static const CMPIBroker* _cb = NULL;
@@ -58,7 +58,7 @@ static CMPIStatus LMI_BatteryPhysicalPackageEnumInstances(
{
LMI_BatteryPhysicalPackage lmi_batt_phys;
const char *ns = KNameSpace(cop);
- char instance_id[INSTANCE_ID_LEN];
+ char instance_id[BUFLEN];
struct tm tm;
unsigned i;
DmiBattery *dmi_batt = NULL;
@@ -72,7 +72,7 @@ static CMPIStatus LMI_BatteryPhysicalPackageEnumInstances(
LMI_BatteryPhysicalPackage_Init(&lmi_batt_phys, _cb, ns);
LMI_BatteryPhysicalPackage_Set_CreationClassName(&lmi_batt_phys,
- LMI_ORGID "_" BATTERY_PHYS_PKG_CLASS_NAME);
+ LMI_BatteryPhysicalPackage_ClassName);
LMI_BatteryPhysicalPackage_Set_PackageType(&lmi_batt_phys,
LMI_BatteryPhysicalPackage_PackageType_Battery);
LMI_BatteryPhysicalPackage_Set_Caption(&lmi_batt_phys,
@@ -80,8 +80,8 @@ static CMPIStatus LMI_BatteryPhysicalPackageEnumInstances(
LMI_BatteryPhysicalPackage_Set_Description(&lmi_batt_phys,
"This object represents one physical battery package in system.");
- snprintf(instance_id, INSTANCE_ID_LEN,
- LMI_ORGID ":" LMI_ORGID "_" BATTERY_PHYS_PKG_CLASS_NAME ":%s",
+ snprintf(instance_id, BUFLEN,
+ LMI_ORGID ":" LMI_BatteryPhysicalPackage_ClassName ":%s",
dmi_batt[i].name);
LMI_BatteryPhysicalPackage_Set_Tag(&lmi_batt_phys, dmi_batt[i].name);