On 3/13/19 4:51 PM, Cole Robinson wrote:
To ease converting the net->model value to an enum, add
the wrapper functions:
virDomainNetGetModelString
virDomainNetSetModelString
virDomainNetStreqModelString
virDomainNetStrcaseeqModelString
Signed-off-by: Cole Robinson <crobinso(a)redhat.com>
---
src/bhyve/bhyve_command.c | 8 ++++----
src/bhyve/bhyve_parse_command.c | 2 +-
src/conf/domain_conf.c | 36 ++++++++++++++++++++++++++++-----
src/conf/domain_conf.h | 7 +++++++
src/libvirt_private.syms | 4 ++++
src/libxl/libxl_conf.c | 8 ++++----
src/qemu/qemu_command.c | 15 +++++++-------
src/qemu/qemu_domain.c | 4 ++--
src/qemu/qemu_domain_address.c | 13 ++++++------
src/qemu/qemu_driver.c | 14 ++++++++++---
src/qemu/qemu_hotplug.c | 7 ++++---
src/qemu/qemu_parse_command.c | 5 +++--
src/vbox/vbox_common.c | 18 ++++++++---------
src/vmx/vmx.c | 31 ++++++++++++++--------------
src/vz/vz_driver.c | 4 ++--
src/vz/vz_sdk.c | 14 ++++++-------
src/xenconfig/xen_common.c | 21 ++++++++++---------
src/xenconfig/xen_sxpr.c | 21 ++++++++++---------
18 files changed, 140 insertions(+), 92 deletions(-)
Missed aa-helper:
diff --git i/src/security/virt-aa-helper.c w/src/security/virt-aa-helper.c
index 989dcf1784..158b614757 100644
--- i/src/security/virt-aa-helper.c
+++ w/src/security/virt-aa-helper.c
@@ -1253,7 +1253,7 @@ get_files(vahControl * ctl)
if (ctl->def->virtType == VIR_DOMAIN_VIRT_KVM) {
for (i = 0; i < ctl->def->nnets; i++) {
virDomainNetDefPtr net = ctl->def->nets[i];
- if (net && net->model) {
+ if (net && virDomainNetGetModelString(net)) {
if (net->driver.virtio.name == VIR_DOMAIN_NET_BACKEND_TYPE_QEMU)
continue;
if (!virDomainNetIsVirtioModel(net))
Michal