]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
qemu: use controller alias when constructing device/controller args
authorLaine Stump <laine@laine.org>
Thu, 30 Apr 2015 17:19:10 +0000 (13:19 -0400)
committerLaine Stump <laine@laine.org>
Fri, 15 May 2015 19:36:28 +0000 (15:36 -0400)
commit0260506c65d51637bfd8ef6cdf2829d34fb05902
tree39cb349e47067ed0036072ca5a4404c9b4599df5
parent75cd7d9b05492dff42fc5519ed04b56af7ac4409
qemu: use controller alias when constructing device/controller args

This makes sure that that the commandlines generated for devices and
controller devices are all using the alias that has been set in the
controller's object as the id of the controller, rather than
hardcoding a printf (or worse, encoding exceptions to the standard
${controller}${index} into the logic)

Since this "fixes" the controller name used for the sata controller,
the commandline arg for the sata controller in the sata test case had
to be adjusted to be "sata0" instead of "ahci0". All other tests
remain unchanged, verifying that the patch causes no other functional
change.

Because the function that finds a controller alias based on a device
def requires a pointer to the full domainDef in order to get the list
of controllers, the arglist of a few functions had to have this added.
src/qemu/qemu_command.c
src/qemu/qemu_command.h
tests/qemuxml2argvdata/qemuxml2argv-disk-sata-device.args