[PATCH v1 09/14] virDomainDeviceInfoCheckABIStability: Check for alias too

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since we'll be passing user's input onto qemu command line, we
have to make sure aliases don't change during migration and all
the other places where ABI is checked. Aliases are part of ABI
now.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/conf/domain_conf.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 0cf67dff1..cb80939af 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -19870,6 +19870,13 @@ virDomainDeviceInfoCheckABIStability(virDomainDeviceInfoPtr src,
         return false;
     }
 
+    if (STRNEQ_NULLABLE(src->alias, dst->alias)) {
+        virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+                       _("Target device alias %s does not match source %s"),
+                       NULLSTR(src->alias), NULLSTR(dst->alias));
+        return false;
+    }
+
     switch ((virDomainDeviceAddressType) src->type) {
     case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI:
         if (src->addr.pci.domain != dst->addr.pci.domain ||
-- 
2.13.6

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux