]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Fix auto-adding of virtio serial controllers
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 3 Jun 2010 12:49:35 +0000 (13:49 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 8 Jun 2010 14:08:21 +0000 (15:08 +0100)
commitf4f91e7b24f8642bcba202a02f7bc401cbb6aa99
treec3eb3ff0d7a4c0572b9838f27f83908e9d583047
parent2e56cfa7d2a2120c759a2b1af93501a1ec0bc4f6
Fix auto-adding of virtio serial controllers

The domain parsing code would auto-add a virtio serial controller
if it saw any virtio serial channel defined. Unfortunately it
always added a controller with index=0, even if the channel address
specified an index != 0. It only added one controller, even if
multiple controllers were referenced by channels. Finally, it let
the ports+vectors parameters initialize to zero instead of -1, which
prevented the controllers accepting any ports.

* src/conf/domain_conf.c: Initialize ports+vectors when adding
  virtio serial controllers. Add all neccessary virtio serial
  controllers, instead of hardcoding controller 0
* qemuxml2argvdata/qemuxml2argv-channel-virtio.args,
  qemuxml2argvdata/qemuxml2argv-channel-virtio.xml: Expand to
  test controller auto-add behaviour
src/conf/domain_conf.c
tests/qemuxml2argvdata/qemuxml2argv-channel-virtio.args
tests/qemuxml2argvdata/qemuxml2argv-channel-virtio.xml