]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
Do not use virtio-serial port 0 for generic ports
authorDavid Allan <dallan@redhat.com>
Mon, 24 Jan 2011 20:47:52 +0000 (15:47 -0500)
committerDavid Allan <dallan@redhat.com>
Thu, 27 Jan 2011 04:02:40 +0000 (23:02 -0500)
Per the discussion in:

https://bugzilla.redhat.com/show_bug.cgi?id=670394

The port numbering should start from 1, not 0.  We assign maxport + 1,
so start maxport at 0.

src/conf/domain_conf.c

index d5445a40a0e0e5f269f9adb7e5f6d474a84f4f8f..08c21e5fa5ab605103c95b6fa6fc8bbed8123c8d 100644 (file)
@@ -5328,7 +5328,7 @@ static virDomainDefPtr virDomainDefParseXML(virCapsPtr caps,
 
         if (chr->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_SERIAL &&
             chr->info.addr.vioserial.port == 0) {
-            int maxport = -1;
+            int maxport = 0;
             int j;
             for (j = 0 ; j < i ; j++) {
                 virDomainChrDefPtr thischr = def->channels[j];