Blame SOURCES/libvirt-conf-Remove-ATTRIBUTE_FALLTHROUGH-from-virDomainChrTargetDefFormat.patch

c1c534
From d91de09fa0a626e200ac0db133a6af69a0706105 Mon Sep 17 00:00:00 2001
c1c534
Message-Id: <d91de09fa0a626e200ac0db133a6af69a0706105@dist-git>
c1c534
From: Andrea Bolognani <abologna@redhat.com>
c1c534
Date: Wed, 29 Nov 2017 16:23:04 +0100
c1c534
Subject: [PATCH] conf: Remove ATTRIBUTE_FALLTHROUGH from
c1c534
 virDomainChrTargetDefFormat()
c1c534
c1c534
Formatting the <target/> element for serial devices will become a
c1c534
bit more complicated later on, and leaving the fallthrough behavior
c1c534
there would do nothing but complicate it further.
c1c534
c1c534
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
c1c534
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
c1c534
(cherry picked from commit 7983068fa50ea5222e62b24ea912a529994276f0)
c1c534
c1c534
https://bugzilla.redhat.com/show_bug.cgi?id=1449265
c1c534
https://bugzilla.redhat.com/show_bug.cgi?id=1511421
c1c534
https://bugzilla.redhat.com/show_bug.cgi?id=1512929
c1c534
https://bugzilla.redhat.com/show_bug.cgi?id=1512934
c1c534
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
c1c534
---
c1c534
 src/conf/domain_conf.c | 14 +++++++++-----
c1c534
 1 file changed, 9 insertions(+), 5 deletions(-)
c1c534
c1c534
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
c1c534
index 2489705d6b..44d9bbe01d 100644
c1c534
--- a/src/conf/domain_conf.c
c1c534
+++ b/src/conf/domain_conf.c
c1c534
@@ -24010,14 +24010,18 @@ virDomainChrTargetDefFormat(virBufferPtr buf,
c1c534
             return -1;
c1c534
         }
c1c534
 
c1c534
+        virBufferAddLit(buf, "
c1c534
+
c1c534
         if (def->targetType != VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_NONE) {
c1c534
             virBufferAsprintf(buf,
c1c534
-                              "<target type='%s' port='%d'/>\n",
c1c534
-                              targetType,
c1c534
-                              def->target.port);
c1c534
-            break;
c1c534
+                              "type='%s' ",
c1c534
+                              targetType);
c1c534
         }
c1c534
-        ATTRIBUTE_FALLTHROUGH;
c1c534
+
c1c534
+        virBufferAsprintf(buf,
c1c534
+                          "port='%d'/>\n",
c1c534
+                          def->target.port);
c1c534
+        break;
c1c534
 
c1c534
     case VIR_DOMAIN_CHR_DEVICE_TYPE_PARALLEL:
c1c534
         virBufferAsprintf(buf, "<target port='%d'/>\n",
c1c534
-- 
c1c534
2.15.1
c1c534