diff options
author | Peter Schiffer <pschiffe@redhat.com> | 2014-05-09 17:37:40 +0200 |
---|---|---|
committer | Peter Schiffer <pschiffe@redhat.com> | 2014-05-12 19:20:43 +0200 |
commit | 28aed3c2c360b84762f76b322e9fc80bd74c036b (patch) | |
tree | 880f68596cbaf7e0e020a6f116c3e789cd4fd60a /src/hardware/LMI_SystemSlotProvider.c | |
parent | 87a03ac7ebff779351e9782d40e691221195f8e0 (diff) | |
download | openlmi-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_SystemSlotProvider.c')
-rw-r--r-- | src/hardware/LMI_SystemSlotProvider.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/hardware/LMI_SystemSlotProvider.c b/src/hardware/LMI_SystemSlotProvider.c index 730c242..f88b52f 100644 --- a/src/hardware/LMI_SystemSlotProvider.c +++ b/src/hardware/LMI_SystemSlotProvider.c @@ -20,7 +20,7 @@ #include <konkret/konkret.h> #include "LMI_SystemSlot.h" -#include "LMI_Hardware.h" +#include "utils.h" #include "dmidecode.h" CMPIUint16 get_connectorlayout_slot(const char *dmi_val); @@ -61,7 +61,7 @@ static CMPIStatus LMI_SystemSlotEnumInstances( LMI_SystemSlot lmi_slot; const char *ns = KNameSpace(cop); CMPIUint16 conn_layout, maxlinkwidth; - char instance_id[INSTANCE_ID_LEN]; + char instance_id[BUFLEN]; unsigned i; DmiSystemSlot *dmi_slots = NULL; unsigned dmi_slots_nb = 0; @@ -74,15 +74,15 @@ static CMPIStatus LMI_SystemSlotEnumInstances( LMI_SystemSlot_Init(&lmi_slot, _cb, ns); LMI_SystemSlot_Set_CreationClassName(&lmi_slot, - LMI_ORGID "_" SYSTEM_SLOT_CLASS_NAME); + LMI_SystemSlot_ClassName); LMI_SystemSlot_Set_Caption(&lmi_slot, "System Slot"); LMI_SystemSlot_Set_Description(&lmi_slot, "This object represents one system slot."); LMI_SystemSlot_Set_ConnectorGender(&lmi_slot, LMI_SystemSlot_ConnectorGender_Female); - snprintf(instance_id, INSTANCE_ID_LEN, - LMI_ORGID ":" LMI_ORGID "_" SYSTEM_SLOT_CLASS_NAME ":%s", + snprintf(instance_id, BUFLEN, + LMI_ORGID ":" LMI_SystemSlot_ClassName ":%s", dmi_slots[i].name); conn_layout = get_connectorlayout_slot(dmi_slots[i].type); maxlinkwidth = get_maxlinkwidth(dmi_slots[i].link_width); |