render / rpms / libvirt

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