From 28aed3c2c360b84762f76b322e9fc80bd74c036b Mon Sep 17 00:00:00 2001 From: Peter Schiffer Date: Fri, 9 May 2014 17:37:40 +0200 Subject: Hardware: spring cleanup & refactor * use openlmi common library where possible * get rid of LMI_Hardware.h file * some other cosmetic changes --- src/hardware/LMI_DiskDriveElementSoftwareIdentityProvider.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/hardware/LMI_DiskDriveElementSoftwareIdentityProvider.c') diff --git a/src/hardware/LMI_DiskDriveElementSoftwareIdentityProvider.c b/src/hardware/LMI_DiskDriveElementSoftwareIdentityProvider.c index cf599be..aff9540 100644 --- a/src/hardware/LMI_DiskDriveElementSoftwareIdentityProvider.c +++ b/src/hardware/LMI_DiskDriveElementSoftwareIdentityProvider.c @@ -20,7 +20,7 @@ #include #include "LMI_DiskDriveElementSoftwareIdentity.h" -#include "LMI_Hardware.h" +#include "utils.h" #include "lsblk.h" static const CMPIBroker* _cb; @@ -59,7 +59,7 @@ static CMPIStatus LMI_DiskDriveElementSoftwareIdentityEnumInstances( LMI_DiskDriveSoftwareIdentityRef lmi_hdd_swi; LMI_DiskDriveRef lmi_hdd; const char *ns = KNameSpace(cop); - char instance_id[INSTANCE_ID_LEN]; + char instance_id[BUFLEN]; unsigned i; LsblkHdd *lsblk_hdds = NULL; unsigned lsblk_hdds_nb = 0; @@ -81,11 +81,11 @@ static CMPIStatus LMI_DiskDriveElementSoftwareIdentityEnumInstances( lmi_get_system_creation_class_name()); LMI_DiskDriveRef_Set_SystemName(&lmi_hdd, lmi_get_system_name()); LMI_DiskDriveRef_Set_CreationClassName(&lmi_hdd, - LMI_ORGID "_" DISK_DRIVE_CLASS_NAME); + LMI_DiskDrive_ClassName); LMI_DiskDriveRef_Set_DeviceID(&lmi_hdd, lsblk_hdds[i].name); - snprintf(instance_id, INSTANCE_ID_LEN, - LMI_ORGID ":" LMI_ORGID "_" DISK_DRIVE_SW_IDENTITY_CLASS_NAME ":%s", + snprintf(instance_id, BUFLEN, + LMI_ORGID ":" LMI_DiskDriveSoftwareIdentity_ClassName ":%s", lsblk_hdds[i].name); LMI_DiskDriveSoftwareIdentityRef_Init(&lmi_hdd_swi, _cb, ns); -- cgit