]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
conf: Add serial target type to ABI stability check
authorLuyao Huang <lhuang@redhat.com>
Wed, 21 Oct 2015 07:14:03 +0000 (15:14 +0800)
committerMartin Kletzander <mkletzan@redhat.com>
Tue, 27 Oct 2015 09:43:52 +0000 (10:43 +0100)
https://bugzilla.redhat.com/show_bug.cgi?id=1273686

There is no ABI check for serial target type attribute, just
add it.

Signed-off-by: Luyao Huang <lhuang@redhat.com>
src/conf/domain_conf.c

index 0c559d2e0753c92fd3d9653789adf1ea882bc45c..9a0c7fc7699857218eca8f067dd79ddcbad21a5c 100644 (file)
@@ -17225,6 +17225,14 @@ static bool
 virDomainSerialDefCheckABIStability(virDomainChrDefPtr src,
                                     virDomainChrDefPtr dst)
 {
+    if (src->targetType != dst->targetType) {
+        virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+                       _("Target serial type %s does not match source %s"),
+                       virDomainChrSerialTargetTypeToString(dst->targetType),
+                       virDomainChrSerialTargetTypeToString(src->targetType));
+        return false;
+    }
+
     if (src->target.port != dst->target.port) {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
                        _("Target serial port %d does not match source %d"),