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 --- .../LMI_DiskDriveDeviceSAPImplementationProvider.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/hardware/LMI_DiskDriveDeviceSAPImplementationProvider.c') diff --git a/src/hardware/LMI_DiskDriveDeviceSAPImplementationProvider.c b/src/hardware/LMI_DiskDriveDeviceSAPImplementationProvider.c index 5b2c186..1201321 100644 --- a/src/hardware/LMI_DiskDriveDeviceSAPImplementationProvider.c +++ b/src/hardware/LMI_DiskDriveDeviceSAPImplementationProvider.c @@ -20,7 +20,7 @@ #include #include "LMI_DiskDriveDeviceSAPImplementation.h" -#include "LMI_Hardware.h" +#include "utils.h" #include "lsblk.h" static const CMPIBroker* _cb; @@ -59,7 +59,7 @@ static CMPIStatus LMI_DiskDriveDeviceSAPImplementationEnumInstances( LMI_DiskDriveATAProtocolEndpointRef lmi_hdd_ata_endp; LMI_DiskDriveATAPortRef lmi_hdd_ata_port; const char *ns = KNameSpace(cop); - char name[ELEMENT_NAME_LEN]; + char name[BUFLEN]; unsigned i; LsblkHdd *lsblk_hdds = NULL; unsigned lsblk_hdds_nb = 0; @@ -76,8 +76,8 @@ static CMPIStatus LMI_DiskDriveDeviceSAPImplementationEnumInstances( LMI_DiskDriveDeviceSAPImplementation_Init(&lmi_hdd_sap_impl, _cb, ns); - snprintf(name, ELEMENT_NAME_LEN, - "%s " DISK_DRIVE_ATA_PORT_CLASS_NAME, + snprintf(name, BUFLEN, + "%s " LMI_DiskDriveATAPort_ClassName, lsblk_hdds[i].name); LMI_DiskDriveATAPortRef_Init(&lmi_hdd_ata_port, _cb, ns); @@ -86,11 +86,11 @@ static CMPIStatus LMI_DiskDriveDeviceSAPImplementationEnumInstances( LMI_DiskDriveATAPortRef_Set_SystemName(&lmi_hdd_ata_port, lmi_get_system_name()); LMI_DiskDriveATAPortRef_Set_CreationClassName(&lmi_hdd_ata_port, - LMI_ORGID "_" DISK_DRIVE_ATA_PORT_CLASS_NAME); + LMI_DiskDriveATAPort_ClassName); LMI_DiskDriveATAPortRef_Set_DeviceID(&lmi_hdd_ata_port, name); - snprintf(name, ELEMENT_NAME_LEN, - "%s " DISK_DRIVE_ATA_PROTO_ENDPOINT_CLASS_NAME, + snprintf(name, BUFLEN, + "%s " LMI_DiskDriveATAProtocolEndpoint_ClassName, lsblk_hdds[i].name); LMI_DiskDriveATAProtocolEndpointRef_Init(&lmi_hdd_ata_endp, _cb, ns); @@ -99,7 +99,7 @@ static CMPIStatus LMI_DiskDriveDeviceSAPImplementationEnumInstances( LMI_DiskDriveATAProtocolEndpointRef_Set_SystemName(&lmi_hdd_ata_endp, lmi_get_system_name()); LMI_DiskDriveATAProtocolEndpointRef_Set_CreationClassName(&lmi_hdd_ata_endp, - LMI_ORGID "_" DISK_DRIVE_ATA_PROTO_ENDPOINT_CLASS_NAME); + LMI_DiskDriveATAProtocolEndpoint_ClassName); LMI_DiskDriveATAProtocolEndpointRef_Set_Name(&lmi_hdd_ata_endp, name); LMI_DiskDriveDeviceSAPImplementation_Set_Antecedent(&lmi_hdd_sap_impl, -- cgit