]> xenbits.xensource.com Git - libvirt.git/commitdiff
conf: Remove dead console compat formatting
authorCole Robinson <crobinso@redhat.com>
Wed, 22 Jun 2016 18:07:03 +0000 (14:07 -0400)
committerCole Robinson <crobinso@redhat.com>
Thu, 23 Jun 2016 00:14:31 +0000 (20:14 -0400)
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

index a4db372ed2a824f64f5bda703f1b1692ca098557..94432814306e7493c64f705d19286186ea467a62 100644 (file)
@@ -23478,20 +23478,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)