os-cmpi-xen
changeset 90:585665e1a296
Fixed regression in Xen_ComputerSystemSettingData.
Bootloader, BootloaderOptions, Kernel, RAMDisk, and
KernelOptions were not being displayed properly.
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
Bootloader, BootloaderOptions, Kernel, RAMDisk, and
KernelOptions were not being displayed properly.
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
author | Jim Fehlig <jfehlig@novell.com> |
---|---|
date | Fri Mar 02 12:00:37 2007 -0700 (2007-03-02) |
parents | 93600f4355d8 |
children | 315d491aec5f |
files | ChangeLog src/Xen_ComputerSystemSettingData_Resource.c |
line diff
1.1 --- a/ChangeLog Wed Feb 28 16:28:14 2007 -0700 1.2 +++ b/ChangeLog Fri Mar 02 12:00:37 2007 -0700 1.3 @@ -1,3 +1,10 @@ 1.4 +------------------------------------------------------------------- 1.5 +Fri Mar 2 11:58:24 MST 2007 - jfehlig@novell.com 1.6 + 1.7 + - Fixed regression in Xen_ComputerSystemSettingData. 1.8 + Bootloader, BootloaderOptions, Kernel, RAMDisk, and 1.9 + KernelOptions were not being displayed properly. 1.10 + 1.11 ------------------------------------------------------------------- 1.12 Wed Feb 28 16:25:05 MST 2007 - jfehlig@novell.com 1.13
2.1 --- a/src/Xen_ComputerSystemSettingData_Resource.c Wed Feb 28 16:28:14 2007 -0700 2.2 +++ b/src/Xen_ComputerSystemSettingData_Resource.c Fri Mar 02 12:00:37 2007 -0700 2.3 @@ -135,7 +135,7 @@ int Xen_ComputerSystemSettingData_setIns 2.4 snprintf(inst_id, 1024, "Xen:%s", resource->name_label); 2.5 CMSetProperty(instance, "InstanceID",(CMPIValue *)inst_id, CMPI_chars); 2.6 2.7 - if (resource->hvm_boot) { 2.8 + if (resource->hvm_boot && (resource->hvm_boot[0] != '\0')) { 2.9 /* HVM settings */ 2.10 CMSetProperty(instance, "VirtualSystemType", (CMPIValue *)"Xen HVM", CMPI_chars); 2.11 CMSetProperty(instance, "BootOrder", (CMPIValue *)resource->hvm_boot, CMPI_chars); 2.12 @@ -145,15 +145,15 @@ int Xen_ComputerSystemSettingData_setIns 2.13 /* PV settings */ 2.14 CMSetProperty(instance, "VirtualSystemType", (CMPIValue *)"Xen Paravirtual", CMPI_chars); 2.15 2.16 - if (resource->pv_kernel) 2.17 + if (resource->pv_kernel && (resource->pv_kernel[0] != '\0')) 2.18 CMSetProperty(instance, "Kernel", (CMPIValue *)resource->pv_kernel, CMPI_chars); 2.19 - if (resource->pv_ramdisk) 2.20 + if (resource->pv_ramdisk && (resource->pv_ramdisk[0] != '\0')) 2.21 CMSetProperty(instance, "RAMDisk", (CMPIValue *)resource->pv_ramdisk, CMPI_chars); 2.22 - if (resource->pv_args) 2.23 + if (resource->pv_args && (resource->pv_args[0] != '\0')) 2.24 CMSetProperty(instance, "KernelOptions" , (CMPIValue *)resource->pv_args, CMPI_chars); 2.25 - if (resource->pv_bootloader) 2.26 + if (resource->pv_bootloader && (resource->pv_bootloader[0] != '\0')) 2.27 CMSetProperty(instance, "Bootloader", (CMPIValue *)resource->pv_bootloader, CMPI_chars); 2.28 - if (resource->pv_bootloader_args) 2.29 + if (resource->pv_bootloader_args && (resource->pv_bootloader_args[0] != '\0')) 2.30 CMSetProperty(instance, "BootloaderOptions", (CMPIValue *)resource->pv_bootloader_args, CMPI_chars); 2.31 } 2.32 2.33 @@ -161,7 +161,7 @@ int Xen_ComputerSystemSettingData_setIns 2.34 CMSetProperty(instance, "ElementName",(CMPIValue *)resource->name_label, CMPI_chars); 2.35 CMSetProperty(instance, "VirtualSystemIdentifier",(CMPIValue *)resource->name_label, CMPI_chars); 2.36 2.37 - if (resource->uuid) 2.38 + if (resource->uuid && (resource->uuid[0] != '\0')) 2.39 CMSetProperty(instance, "UUID", (CMPIValue *)resource->uuid, CMPI_chars); 2.40 2.41 CMSetProperty(instance, "localtime", (CMPIValue *)&(resource->platform_localtime), CMPI_boolean);