Release of libvirt-cim 0.6.3
by Daniel Veillard
As promised I looked at the set of patches left without attention,
all looked okay, so I pushed them and making the expected release.
libvirt-cim-0.6.3 is now tagged in git and available in tarballs and
rpms at the usual FTP location:
ftp://libvirt.org/libvirt-cim/
This is mostly a bug fix release as John chased all the Coverity
reports on the code base and provided fixes, there is also a few
improvement from Xu Wang:
Improvements:
- Add shareable property to disk (Xu Wang)
- Update GPL (John Ferlan)
- Improve support of nested KVM (Xu Wang)
- make lldptool command and support output configurable (Xu Wang)
- add an config option to disable KVM acceleration. (Xu Wang)
- Update spec file with changes coming from Fedora (Daniel Veillard)
Bug fixes:
- Resolve Coverity complaint (John Ferlan)
- CSI: Address two Coverity isssues (John Ferlan)
- Fix kvm support check logic (Xu Wang)
- Coverity: Resolve ARRAY_VS_SINGLETON - get_dev_paths() and callers (John Ferlan)
- Coverity: Resolve USE_AFTER_FREE - lifecycle_thread_native() (John Ferlan)
- Coverity: Resolve UNUSED_VALUE - system_xml() && mem_xml() (John Ferlan)
- Coverity: Resolve UNINIT - vsss_delete_snapshot() (John Ferlan)
- Coverity: Resolve REVERSE_INULL - lifecycle_thread_native() (John Ferlan)
- Coverity: Resolve REVERSE_INULL - doms_to_xml() (John Ferlan)
- Coverity: Resolve RESOURCE_LEAK - parse_os() (John Ferlan)
- Coverity: Resolve NO_EFFECT - _set_fv_prop() (John Ferlan)
- Coverity: Resolve NO_EFFECT - set_proc_rasd_params() (John Ferlan)
- Coverity: Resolve DEADCODE - octets_from_ip() (John Ferlan)
- Coverity: Resolve DEADCODE - get_hypervisor_enabled() (John Ferlan)
- Coverity: Resolve DEADCODE - do_parse() (John Ferlan)
- Coverity: Resolve CHECKED_RETURN - return_enum_rasds() (John Ferlan)
- Coverity: Resolve CHECKED_RETURN - mem_rasd_to_vdev() (John Ferlan)
- Coverity: Resolve CHECKED_RETURN - get_pools() (John Ferlan)
- Coverity: Resolve CHECKED_RETURN - get_dev_from_pool (John Ferlan)
- Coverity: Resolve CHECKED_RETURN - filter_by_pool() (John Ferlan)
- Coverity: Resolve CHECKED_RETURN - _generic_infostore_open() (John Ferlan)
- Coverity: Resolve BAD_COMPARE - ActivateFilter() (John Ferlan)
- VSMS: tip error for invalid disk resource (Xu Wang)
thanks for the patches and efforts to bring up this release :-) !
Daniel
--
Daniel Veillard | Open Source and Standards, Red Hat
veillard(a)redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | virtualization library http://libvirt.org/
11 years, 5 months
[PATCH] Add OS version check to decide use service or systemctl command
by Xu Wang
Only when version of Fedora more than/equal with 17 or version of
RHEL more than/equal with 7, the system could use systemd to manage
services. Except above systems only "service" command could be used
instead of systemctl. This patch checks system version before restart
service after installation finished and decide which command to be
used to avoid "systemctl: Command not found" error happened on some
system such as RHEL6.4.
Signed-off-by: Xu Wang <cngesaint(a)gmail.com>
---
libvirt-cim.spec.in | 22 +++++++++++++---------
1 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/libvirt-cim.spec.in b/libvirt-cim.spec.in
index d024c59..7b6221e 100644
--- a/libvirt-cim.spec.in
+++ b/libvirt-cim.spec.in
@@ -89,15 +89,19 @@ rm -fr $RPM_BUILD_ROOT
%{_datadir}/%{name}/install_base_schema.sh %{_datadir}/%{name}
-if [ "`systemctl is-active tog-pegasus.service`" = "active" ]
-then
- systemctl restart tog-pegasus.service
-fi
-
-if [ "`systemctl is-active sblim-sfcb.service`" = "active" ]
-then
- systemctl restart sblim-sfcb.service
-fi
+%if 0%{?Fedora} >= 17 || 0%{?rhel} >= 7
+ if [ "`systemctl is-active tog-pegasus.service`" = "active" ]
+ then
+ systemctl restart tog-pegasus.service
+ fi
+
+ if [ "`systemctl is-active sblim-sfcb.service`" = "active" ]
+ then
+ systemctl restart sblim-sfcb.service
+ fi
+%else
+ /etc/init.d/tog-pegasus condrestart
+%endif
if [ -x /usr/sbin/cimserver ]
then
--
1.7.1
11 years, 5 months
[PATCH] Add shareable property to disk
by cngesaint@gmail.com
From: Xu Wang <cngesaint(a)gmail.com>
This patch adds shareable property to disks.
Signed-off-by: Xu Wang <cngesaint(a)gmail.com>
---
schema/ResourceAllocationSettingData.mof | 6 ++++++
src/Virt_RASD.c | 6 ++++++
src/Virt_SettingsDefineCapabilities.c | 14 ++++++++++++++
src/Virt_VirtualSystemManagementService.c | 6 ++++++
4 files changed, 32 insertions(+), 0 deletions(-)
diff --git a/schema/ResourceAllocationSettingData.mof b/schema/ResourceAllocationSettingData.mof
index 108dff7..871ab04 100644
--- a/schema/ResourceAllocationSettingData.mof
+++ b/schema/ResourceAllocationSettingData.mof
@@ -28,6 +28,9 @@ class Xen_DiskResourceAllocationSettingData : Xen_ResourceAllocationSettingData
[Description ("cache setting for device")]
string DriverCache;
+
+ [Description ("if device is shareable")]
+ boolean shareable;
};
[Description ("KVM virtual disk configuration"),
@@ -61,6 +64,9 @@ class KVM_DiskResourceAllocationSettingData : KVM_ResourceAllocationSettingData
[Description ("filesystem access mode")]
string AccessMode;
+
+ [Description ("if device is shareable")]
+ boolean shareable;
};
[Description ("LXC virtual disk configuration"),
diff --git a/src/Virt_RASD.c b/src/Virt_RASD.c
index baf4331..150ccd3 100644
--- a/src/Virt_RASD.c
+++ b/src/Virt_RASD.c
@@ -421,6 +421,12 @@ static CMPIStatus set_disk_rasd_params(const CMPIBroker *broker,
(CMPIValue *)dev->dev.disk.access_mode,
CMPI_chars);
+ if(dev->dev.disk.shareable)
+ CMSetProperty(inst,
+ "shareable",
+ (CMPIValue *)&(dev->dev.disk.shareable),
+ CMPI_boolean);
+
virStoragePoolFree(pool);
virStorageVolFree(vol);
virConnectClose(conn);
diff --git a/src/Virt_SettingsDefineCapabilities.c b/src/Virt_SettingsDefineCapabilities.c
index 2c35d84..78c128c 100644
--- a/src/Virt_SettingsDefineCapabilities.c
+++ b/src/Virt_SettingsDefineCapabilities.c
@@ -1039,6 +1039,7 @@ static CMPIStatus set_disk_props(int type,
uint64_t disk_size,
uint16_t emu_type,
bool readonly,
+ bool shareable,
const char *cache,
struct inst_list *list)
{
@@ -1087,6 +1088,10 @@ static CMPIStatus set_disk_props(int type,
CMSetProperty(inst, "readonly",
(CMPIValue *)&readonly, CMPI_boolean);
+ if(shareable)
+ CMSetProperty(inst, "shareable",
+ (CMPIValue *)&shareable, CMPI_boolean);
+
if(cache != NULL)
CMSetProperty(inst, "cache",
(CMPIValue *)cache, CMPI_chars);
@@ -1111,6 +1116,7 @@ static CMPIStatus cdrom_or_floppy_template(const CMPIObjectPath *ref,
const char *dev_str = NULL;
char *id_str = NULL;
bool readonly = true;
+ bool shareable = false;
const char *cache = "none";
if (emu_type == VIRT_DISK_TYPE_CDROM)
@@ -1158,6 +1164,7 @@ static CMPIStatus cdrom_or_floppy_template(const CMPIObjectPath *ref,
vol_size,
emu_type,
readonly,
+ shareable,
cache,
list);
}
@@ -1169,6 +1176,7 @@ static CMPIStatus cdrom_or_floppy_template(const CMPIObjectPath *ref,
vol_size,
emu_type,
readonly,
+ shareable,
cache,
list);
@@ -1244,6 +1252,7 @@ static CMPIStatus default_disk_template(const CMPIObjectPath *ref,
int type = 0;
bool ret;
bool readonly = true;
+ bool shareable = false;
const char *cache = "none";
CMPIStatus s = {CMPI_RC_OK, NULL};
@@ -1296,6 +1305,7 @@ static CMPIStatus default_disk_template(const CMPIObjectPath *ref,
disk_size,
emu_type,
readonly,
+ shareable,
cache,
list);
if (s.rc != CMPI_RC_OK)
@@ -1317,6 +1327,7 @@ static CMPIStatus default_disk_template(const CMPIObjectPath *ref,
disk_size,
emu_type,
readonly,
+ shareable,
cache,
list);
}
@@ -1444,6 +1455,7 @@ static CMPIStatus avail_volume_template(const CMPIObjectPath *ref,
int ret;
uint16_t emu_type = 0;
bool readonly = false;
+ bool shareable = false;
const char *cache = "none";
ret = virStorageVolGetInfo(volume_ptr, &vol_info);
@@ -1502,6 +1514,7 @@ static CMPIStatus avail_volume_template(const CMPIObjectPath *ref,
vol_size,
emu_type,
readonly,
+ shareable,
cache,
list);
}
@@ -1513,6 +1526,7 @@ static CMPIStatus avail_volume_template(const CMPIObjectPath *ref,
vol_size,
emu_type,
readonly,
+ shareable,
cache,
list);
} else {
diff --git a/src/Virt_VirtualSystemManagementService.c b/src/Virt_VirtualSystemManagementService.c
index 5adfe20..8ced2d6 100644
--- a/src/Virt_VirtualSystemManagementService.c
+++ b/src/Virt_VirtualSystemManagementService.c
@@ -994,6 +994,7 @@ static const char *disk_rasd_to_vdev(CMPIInstance *inst,
uint16_t type;
bool read = false;
int rc;
+ bool shareable = false;
CU_DEBUG("Enter disk_rasd_to_vdev");
if (cu_get_str_prop(inst, "VirtualDevice", &val) != CMPI_RC_OK)
@@ -1093,6 +1094,11 @@ static const char *disk_rasd_to_vdev(CMPIInstance *inst,
else
dev->dev.disk.access_mode = strdup(val);
+ if (cu_get_bool_prop(inst, "shareable", &shareable) != CMPI_RC_OK)
+ dev->dev.disk.shareable = false;
+ else
+ dev->dev.disk.shareable = shareable;
+
free(dev->id);
dev->id = strdup(dev->dev.disk.virtual_dev);
--
1.7.1
11 years, 5 months
[PATCH 0/2] Address Coverity issues
by John Ferlan
During a scan of the Red Hat libvirt-cim sources there were 3 issues
discovered that weren't already address by upstream patches. See
https://bugzilla.redhat.com/show_bug.cgi?id=885104
These patches address them... I'd like to get these in and then cut a
release so that it can be included in RHEL7.0 pools which are set to
close at the end of July.
I ran these changes through cimtest with no new regression.
John Ferlan (2):
CSI: Address two Coverity isssues
Resolve Coverity complaint
src/Virt_ComputerSystemIndication.c | 14 ++++++++------
src/Virt_VSMigrationService.c | 2 ++
2 files changed, 10 insertions(+), 6 deletions(-)
--
1.8.1.4
11 years, 5 months
[PATCH V2] Add default network card name existence check
by Xu Wang
Default network card name was set as 'eth1' or 'em1'. But when os has no network card named like that, FAIL
would occured. This patch added check if default name exists in the network card list and if not, change
the default value into the 1st one in the list.
Signed-off-by: Xu Wang <cngesaint(a)gmail.com>
---
.../27_definesystem_macvtap_dev.py | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/27_definesystem_macvtap_dev.py b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/27_definesystem_macvtap_dev.py
index 36bf52f..e096e98 100644
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/27_definesystem_macvtap_dev.py
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/27_definesystem_macvtap_dev.py
@@ -30,6 +30,7 @@
#
import sys
+import os
from CimTest.Globals import logger
from CimTest.ReturnCodes import FAIL, PASS, SKIP
from VirtLib import utils
@@ -132,6 +133,14 @@ def main():
else:
source_dev = "eth1"
+ # The default device name may not named 'eth1' or 'em1' so this case would
+ # return FAIL. The following code will check if default device exists in
+ # the network card list and if not, source_dev will be changed into the 1st
+ # network card in the list.
+ net_info = os.popen('ip addr').read()
+ if net_info.find(source_dev) == -1:
+ source_dev = net_info.split(': ')[3]
+
guest_defined = False
try:
--
1.7.1
11 years, 5 months
Should we generate a new release? 0.6.3?
by John Ferlan
There's been a few functional changes and some cleanup - it would be
nice to generate a release baseline that could then be moved into the
RHEL7.0 release as well rather than picking 0.6.2 and trying to "patch
in" changes that are now upstream. The last release was 4/15 so it's
about 3 months later.
Thoughts?
John
11 years, 5 months
[PATCH] Add default network card name existence check
by Xu Wang
Default network card name was set as 'eth1' or 'em1'. But when os has no network card named like that, FAIL
would occured. This patch added check if default name exists in the network card list and if not, change
the default value into the 1st one in the list.
Signed-off-by: Xu Wang <cngesaint(a)gmail.com>
---
.../27_definesystem_macvtap_dev.py | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/27_definesystem_macvtap_dev.py b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/27_definesystem_macvtap_dev.py
index 36bf52f..7832e90 100644
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/27_definesystem_macvtap_dev.py
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/27_definesystem_macvtap_dev.py
@@ -30,6 +30,7 @@
#
import sys
+import os
from CimTest.Globals import logger
from CimTest.ReturnCodes import FAIL, PASS, SKIP
from VirtLib import utils
@@ -132,6 +133,14 @@ def main():
else:
source_dev = "eth1"
+ # The default device name may not named 'eth1' or 'em1' so this case would
+ # return FAIL. The following code will check if default device exists in
+ # the network card list and if not, source_dev will be changed into the 1st
+ # network card in the list.
+ net_info = os.popen('ifconfig').read()
+ if net_info.find(source_dev) == -1:
+ source_dev = net_info.split(' ')[0]
+
guest_defined = False
try:
--
1.7.1
11 years, 5 months
[PATCH 0/2] Couple of fixes for cimtest
by John Ferlan
I've been using the changes in this patchset for a while, just hadn't posted
them. The changes resolve issues seen in the 22_multi_brg_interface test.
While testing I also found a latent issue elsewhere - I cannot remember where
I ran the test, only that it failed for the reasons indicated in the commit.
With these patches installed, I get the following test results as shown
in the 'suites/libvirt-cim/run_report.txt' output:
=================================================
Test Run Summary (Jul 08 2013): KVM on Fedora release 18 (Spherical Cow) with Pe
gasus
=================================================
Distro: Fedora release 18 (Spherical Cow)
Kernel: 3.9.6-200.fc18.x86_64
libvirt: 1.1.0
Hypervisor: QEMU 1.5.50
CIMOM: Pegasus 2.12.0
Libvirt-cim revision: 1225
Libvirt-cim changeset: 07adabc
Cimtest revision: 907
Cimtest changeset: 442a7b1
Total test execution: Unknown
=================================================
FAIL : 3
XFAIL : 3
SKIP : 11
PASS : 175
-----------------
Total : 192
=================================================
FAIL Test Summary:
ComputerSystemIndication - 01_created_indication.py: FAIL
RASDIndications - 01_guest_states_rasd_ind.py: FAIL
RASDIndications - 02_guest_add_mod_rem_rasd_ind.py: FAIL
=================================================
XFAIL Test Summary:
SwitchService - 01_enum.py: XFAIL
VirtualSystemManagementService - 28_definesystem_with_vsi_profile.py: XFAIL
VirtualSystemManagementService - 30_dynamic_disk_mod.py: XFAIL
=================================================
SKIP Test Summary:
ComputerSystem - 02_nosystems.py: SKIP
ComputerSystemMigrationJobIndication - 01_csmig_ind_for_offline_mig.py: SKIP
LogicalDisk - 02_nodevs.py: SKIP
Profile - 04_verify_libvirt_cim_slp_profiles.py: SKIP
VirtualSystemMigrationService - 01_migratable_host.py: SKIP
VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP
VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP
VirtualSystemMigrationService - 06_remote_live_migration.py: SKIP
VirtualSystemMigrationService - 07_remote_offline_migration.py: SKIP
VirtualSystemMigrationService - 08_remote_restart_resume_migration.py: SKIP
VSSD - 02_bootldr.py: SKIP
NOTE: The *Indications tests have not worked in my environment ever. I chased
the issue down to network configuration within whatever segment of the Red Hat
domain I'm in.
John Ferlan (2):
Allow adding bridged network for running domain
Remove extranous or unnecessary parameter from error messages
.../cimtest/Profile/03_rprofile_gi_errs.py | 2 +-
suites/libvirt-cim/cimtest/RASD/03_rasd_errs.py | 2 +-
.../cimtest/ResourcePool/02_rp_gi_errors.py | 2 +-
.../22_addmulti_brg_interface.py | 9 +++++++--
suites/libvirt-cim/lib/XenKvmLib/vsms_util.py | 23 +++++++++++++++++-----
5 files changed, 28 insertions(+), 10 deletions(-)
--
1.8.1.4
11 years, 5 months
[PATCH V5] Fix kvm support check logic
by Xu Wang
Now system_has_kvm() would check all type value of domain label in
caps. If any of them type is "kvm", system_has_kvm() return 1 as
true result.
Signed-off-by: Xu Wang <cngesaint(a)gmail.com>
---
libxkutil/device_parsing.c | 16 +++++++++-------
libxkutil/device_parsing.h | 2 +-
src/Virt_VirtualSystemManagementService.c | 7 +------
3 files changed, 11 insertions(+), 14 deletions(-)
diff --git a/libxkutil/device_parsing.c b/libxkutil/device_parsing.c
index 16195da..9d7ddb4 100644
--- a/libxkutil/device_parsing.c
+++ b/libxkutil/device_parsing.c
@@ -396,31 +396,33 @@ err:
return 0;
}
-int parse_domain_type(xmlNodePtr node, char **value)
+bool has_kvm_domain_type(xmlNodePtr node)
{
xmlNodePtr child = NULL;
char *type = NULL;
+ bool ret = false;
child = node->children;
while (child != NULL) {
if (XSTREQ(child->name, "domain")) {
type = get_attr_value(child, "type");
- if (type != NULL) {
- *value = strdup(type);
+ if (XSTREQ(type, "kvm")) {
+ ret = true;
goto out;
}
}
- if (parse_domain_type(child, value) == 1) {
+ if (has_kvm_domain_type(child) == 1) {
+ ret = true;
goto out;
}
child = child->next;
}
- return 0;
-out:
- return 1;
+ out:
+ free(type);
+ return ret;
}
static int parse_net_device(xmlNode *inode, struct virt_device **vdevs)
diff --git a/libxkutil/device_parsing.h b/libxkutil/device_parsing.h
index 733324f..2a4c911 100644
--- a/libxkutil/device_parsing.h
+++ b/libxkutil/device_parsing.h
@@ -221,7 +221,7 @@ int attach_device(virDomainPtr dom, struct virt_device *dev);
int detach_device(virDomainPtr dom, struct virt_device *dev);
int change_device(virDomainPtr dom, struct virt_device *dev);
-int parse_domain_type(xmlNodePtr node, char **value);
+bool has_kvm_domain_type(xmlNodePtr node);
#define XSTREQ(x, y) (STREQ((char *)x, y))
#define STRPROP(d, p, n) (d->p = get_node_content(n))
diff --git a/src/Virt_VirtualSystemManagementService.c b/src/Virt_VirtualSystemManagementService.c
index 8e1e6b1..199ab2d 100644
--- a/src/Virt_VirtualSystemManagementService.c
+++ b/src/Virt_VirtualSystemManagementService.c
@@ -394,7 +394,6 @@ static bool system_has_kvm(const char *pfx)
virConnectPtr conn = NULL;
char *caps = NULL;
bool disable_kvm = get_disable_kvm();
- char *val = NULL;
xmlDocPtr doc = NULL;
xmlNodePtr node = NULL;
int len;
@@ -427,19 +426,15 @@ static bool system_has_kvm(const char *pfx)
goto out;
}
- if (parse_domain_type(node, &val) &&
- STREQC(val, "kvm")) {
+ if (has_kvm_domain_type(node)) {
CU_DEBUG("The system support kvm!");
kvm = true;
- } else {
- CU_DEBUG("Domain type is %s.", val);
}
}
out:
free(caps);
free(doc);
- free(val);
virConnectClose(conn);
--
1.7.1
11 years, 5 months
[PATCH V4] Fix kvm support check logic
by Xu Wang
Now system_has_kvm() would check all type value of domain label in
caps. If any of them type is "kvm", system_has_kvm() return 1 as
true result.
Signed-off-by: Xu Wang <cngesaint(a)gmail.com>
---
libxkutil/device_parsing.c | 13 +++++--------
libxkutil/device_parsing.h | 2 +-
src/Virt_VirtualSystemManagementService.c | 7 +------
3 files changed, 7 insertions(+), 15 deletions(-)
diff --git a/libxkutil/device_parsing.c b/libxkutil/device_parsing.c
index 16195da..98c6c54 100644
--- a/libxkutil/device_parsing.c
+++ b/libxkutil/device_parsing.c
@@ -396,7 +396,7 @@ err:
return 0;
}
-int parse_domain_type(xmlNodePtr node, char **value)
+int has_kvm_domain_type(xmlNodePtr node)
{
xmlNodePtr child = NULL;
char *type = NULL;
@@ -405,22 +405,19 @@ int parse_domain_type(xmlNodePtr node, char **value)
while (child != NULL) {
if (XSTREQ(child->name, "domain")) {
type = get_attr_value(child, "type");
- if (type != NULL) {
- *value = strdup(type);
- goto out;
+ if (XSTREQ(type, "kvm")) {
+ return 1;
}
}
- if (parse_domain_type(child, value) == 1) {
- goto out;
+ if (has_kvm_domain_type(child) == 1) {
+ return 1;
}
child = child->next;
}
return 0;
-out:
- return 1;
}
static int parse_net_device(xmlNode *inode, struct virt_device **vdevs)
diff --git a/libxkutil/device_parsing.h b/libxkutil/device_parsing.h
index 733324f..6abcf14 100644
--- a/libxkutil/device_parsing.h
+++ b/libxkutil/device_parsing.h
@@ -221,7 +221,7 @@ int attach_device(virDomainPtr dom, struct virt_device *dev);
int detach_device(virDomainPtr dom, struct virt_device *dev);
int change_device(virDomainPtr dom, struct virt_device *dev);
-int parse_domain_type(xmlNodePtr node, char **value);
+int has_kvm_domain_type(xmlNodePtr node);
#define XSTREQ(x, y) (STREQ((char *)x, y))
#define STRPROP(d, p, n) (d->p = get_node_content(n))
diff --git a/src/Virt_VirtualSystemManagementService.c b/src/Virt_VirtualSystemManagementService.c
index 8e1e6b1..199ab2d 100644
--- a/src/Virt_VirtualSystemManagementService.c
+++ b/src/Virt_VirtualSystemManagementService.c
@@ -394,7 +394,6 @@ static bool system_has_kvm(const char *pfx)
virConnectPtr conn;
char *caps = NULL;
bool disable_kvm = get_disable_kvm();
- char *val = NULL;
xmlDocPtr doc = NULL;
xmlNodePtr node = NULL;
int len;
@@ -427,19 +426,15 @@ static bool system_has_kvm(const char *pfx)
goto out;
}
- if (parse_domain_type(node, &val) &&
- STREQC(val, "kvm")) {
+ if (has_kvm_domain_type(node)) {
CU_DEBUG("The system support kvm!");
kvm = true;
- } else {
- CU_DEBUG("Domain type is %s.", val);
}
}
out:
free(caps);
free(doc);
- free(val);
virConnectClose(conn);
--
1.7.1
11 years, 6 months