]> git.ipfire.org Git - thirdparty/libvirt.git/commit
libxl: fix return value error Attach|DetachDeviceFlags
authorChunyan Liu <cyliu@suse.com>
Tue, 15 Jul 2014 05:03:16 +0000 (13:03 +0800)
committerJim Fehlig <jfehlig@suse.com>
Tue, 15 Jul 2014 17:02:25 +0000 (11:02 -0600)
commit2f97ea328f6c8df59e07b24122a8ff95efca95b8
treea9ce772af14da4542fe8148b7c297501db6f6207
parentb0d24540237404e3c840600e54109be4e5789f0a
libxl: fix return value error Attach|DetachDeviceFlags

Code logic in libxlDomainAttachDeviceFlags and libxlDomainDetachDeviceFlags
is wrong with return value in error cases.

'ret' was being set to 0 if 'flags & VIR_DOMAIN_DEVICE_MODIFY_CONFIG' was
false. Then if something like virDomainDeviceDefParse() failed in the
VIR_DOMAIN_DEVICE_MODIFY_LIVE logic, the error would be reported but the
function would return success.

Signed-off-by: Chunyan Liu <cyliu@suse.com>
src/libxl/libxl_driver.c