于 2011年07月15日 23:13, Eric Blake 写道:
On 07/15/2011 09:16 AM, Osier Yang wrote:
The regression is introduced by Commit da1eba6b, the new
codes with this commit doesn't reset "ret" to "-1" when
it fails on parsing the device XML (live device attachment)
This patch changes the codes to reset the "ret" and "-1",
and also changes the codes so that it don't modify "ret"
for condition checking.
How to reproduce:
<disk type='oops' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/var/lib/libvirt/images/test.img'/>
<target dev='vda' bus='virtio'/>
</disk>
Device attached successfully
---
src/qemu/qemu_driver.c | 23 +++++++++++++++++------
1 files changed, 17 insertions(+), 6 deletions(-)
ACK. The commit message is better this time, and the flow of logic,
although requiring more lines, is easier to understand.
/*
* update domain status forcibly because the domain status may be
* changed even if we attach the device failed. For example, a
While you're touching this area of code,
s/even if we attach the device failed/even we failed to attach the device/
* For example, a new controller may be created.
Also, delete the redundant "For example, a".
Thanks, pushed with better commit message and the comments updated.
Regards
Osier
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list