]> xenbits.xensource.com Git - libvirt.git/commit
Refactor qemuCapsParseDeviceStr to work from data tables
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 13 Sep 2012 17:04:24 +0000 (18:04 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Fri, 28 Sep 2012 10:25:49 +0000 (11:25 +0100)
commitb073fe40db4dadee0e127108d99e8713758078ef
tree99076424cbc89e780e0b92248d96c0316db57b07
parent90af1babd4dc96ef67effdef3b92b76621bbc28a
Refactor qemuCapsParseDeviceStr to work from data tables

Currently the qemuCapsParseDeviceStr method has a bunch of open
coded string searches/comparisons to detect devices and their
properties. Soon this data will be obtained from QMP queries
instead of -device help output. Maintaining the list of device
and properties in two places is undesirable. Thus the existing
qemuCapsParseDeviceStr() method needs to be refactored to
separate the device types and properties from the actual
search code.

Thus the -device help output is now parsed to construct a
list of device names, and device properties. These are then
checked against a set of datatables to set the capability
flags

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/qemu/qemu_capabilities.c
src/qemu/qemu_capabilities.h
tests/qemuhelptest.c