summaryrefslogtreecommitdiffstats
path: root/src/hardware/LMI_DiskDriveProvider.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_DiskDriveProvider.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_DiskDriveProvider.c')
-rw-r--r--src/hardware/LMI_DiskDriveProvider.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/hardware/LMI_DiskDriveProvider.c b/src/hardware/LMI_DiskDriveProvider.c
index 21e5b18..c71d075 100644
--- a/src/hardware/LMI_DiskDriveProvider.c
+++ b/src/hardware/LMI_DiskDriveProvider.c
@@ -22,7 +22,7 @@
#include <limits.h>
#include <konkret/konkret.h>
#include "LMI_DiskDrive.h"
-#include "LMI_Hardware.h"
+#include "utils.h"
#include "smartctl.h"
#include "lsblk.h"
#include "sysfs.h"
@@ -66,7 +66,7 @@ static CMPIStatus LMI_DiskDriveEnumInstances(
const char *ns = KNameSpace(cop);
unsigned i, j, rotational = 0, rpm;
unsigned long capacity = 0;
- char instance_id[INSTANCE_ID_LEN], path[PATH_MAX], *name;
+ char instance_id[BUFLEN], path[PATH_MAX], *name;
CMPIUint16 operational_status;
SmartctlHdd *smtcl_hdds = NULL;
unsigned smtcl_hdds_nb = 0;
@@ -98,13 +98,13 @@ static CMPIStatus LMI_DiskDriveEnumInstances(
lmi_get_system_creation_class_name());
LMI_DiskDrive_Set_SystemName(&lmi_hdd, lmi_get_system_name());
LMI_DiskDrive_Set_CreationClassName(&lmi_hdd,
- LMI_ORGID "_" DISK_DRIVE_CLASS_NAME);
+ LMI_DiskDrive_ClassName);
LMI_DiskDrive_Set_Caption(&lmi_hdd, "Disk Drive");
LMI_DiskDrive_Set_Description(&lmi_hdd,
"This object represents one physical disk drive in system.");
- snprintf(instance_id, INSTANCE_ID_LEN,
- LMI_ORGID ":" LMI_ORGID "_" DISK_DRIVE_CLASS_NAME ":%s",
+ snprintf(instance_id, BUFLEN,
+ LMI_ORGID ":" LMI_DiskDrive_ClassName ":%s",
lsblk_hdds[i].name);
LMI_DiskDrive_Set_DeviceID(&lmi_hdd, lsblk_hdds[i].name);