diff mbox

conf: Remove dead console compat formatting

Message ID 1412bce0acc777730b58d0ca1fcbdae073f5c1e3.1466621483.git.crobinso@redhat.com
State Accepted
Commit 03ce1328086d6937d2647d616efff29941a3e80a
Headers show

Commit Message

Cole Robinson June 22, 2016, 6:51 p.m. UTC
This code was attempting to handle some implicit <console> XML
formatting for manually assembled DomainDef, since previously the
console<->serial compat copying was only done at XML parse time.

Nowadays it's done via virDomainDefPostParse ->
virDomainDefAddConsoleCompat, which all manual DomainDef builders
already call, so we can drop this workaround.
---
 src/conf/domain_conf.c | 14 --------------
 1 file changed, 14 deletions(-)

-- 
2.7.4

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

Patch

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 75ad03f..6ab7450 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -23463,20 +23463,6 @@  virDomainDefFormatInternal(virDomainDefPtr def,
         if (virDomainChrDefFormat(buf, &console, flags) < 0)
             goto error;
     }
-    /* The back-compat console device stub is added when parsing the domain XML
-     * and handled above, this is for formatting definitions created via other
-     * means.
-     */
-    if (def->os.type == VIR_DOMAIN_OSTYPE_HVM &&
-        def->nconsoles == 0 &&
-        def->nserials > 0) {
-        virDomainChrDef console;
-        memcpy(&console, def->serials[n], sizeof(console));
-        console.deviceType = VIR_DOMAIN_CHR_DEVICE_TYPE_CONSOLE;
-        console.targetType = VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SERIAL;
-        if (virDomainChrDefFormat(buf, &console, flags) < 0)
-            goto error;
-    }
 
     for (n = 0; n < def->nchannels; n++)
         if (virDomainChrDefFormat(buf, def->channels[n], flags) < 0)