Blame SOURCES/libvirt-qemu-hotplug-report-error-when-changing-rom-enabled-attr-for-net-iface.patch

9c6c51
From ddc505c4dd054d6d92099d467ba255eabcb84922 Mon Sep 17 00:00:00 2001
9c6c51
Message-Id: <ddc505c4dd054d6d92099d467ba255eabcb84922@dist-git>
9c6c51
From: Katerina Koukiou <kkoukiou@redhat.com>
9c6c51
Date: Mon, 16 Jul 2018 11:42:28 +0200
9c6c51
Subject: [PATCH] qemu: hotplug: report error when changing rom enabled attr
9c6c51
 for net iface
9c6c51
MIME-Version: 1.0
9c6c51
Content-Type: text/plain; charset=UTF-8
9c6c51
Content-Transfer-Encoding: 8bit
9c6c51
9c6c51
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1599513
9c6c51
9c6c51
Signed-off-by: Katerina Koukiou <kkoukiou@redhat.com>
9c6c51
Reviewed-by: Ján Tomko <jtomko@redhat.com>
9c6c51
(cherry picked from commit 611b038fb60e23eb574148192090f33bc7264be2)
9c6c51
Signed-off-by: Katerina Koukiou <kkoukiou@redhat.com>
9c6c51
Reviewed-by: Ján Tomko <jtomko@redhat.com>
9c6c51
---
9c6c51
 src/qemu/qemu_hotplug.c | 5 +++++
9c6c51
 1 file changed, 5 insertions(+)
9c6c51
9c6c51
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
9c6c51
index 3d0f1055d9..91a751a2fe 100644
9c6c51
--- a/src/qemu/qemu_hotplug.c
9c6c51
+++ b/src/qemu/qemu_hotplug.c
9c6c51
@@ -3222,6 +3222,11 @@ qemuDomainChangeNet(virQEMUDriverPtr driver,
9c6c51
                        _("cannot modify network device boot index setting"));
9c6c51
         goto cleanup;
9c6c51
     }
9c6c51
+    if (olddev->info.romenabled != newdev->info.romenabled) {
9c6c51
+        virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
9c6c51
+                       _("cannot modify network device rom enabled setting"));
9c6c51
+        goto cleanup;
9c6c51
+    }
9c6c51
     /* (end of device info checks) */
9c6c51
 
9c6c51
     if (STRNEQ_NULLABLE(olddev->filter, newdev->filter) ||
9c6c51
-- 
9c6c51
2.18.0
9c6c51