[libvirt] [PATCH 1/5] qemu_hotplug: Properly check for qemuMonitorDelDevice retval

Peter Krempa pkrempa at redhat.com
Tue Mar 12 15:24:06 UTC 2019


On Tue, Mar 12, 2019 at 16:13:16 +0100, Michal Privoznik wrote:
> Luckily, the function returns only 0 or -1 so all the checks work
> as expected. Anyway, our rule is that a positive value means
> success so if the function ever returns a positive value these
> checks will fail. Make them check for a negative value properly.
> 
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
>  src/qemu/qemu_hotplug.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

The commit message suggests that only qemuMonitorDelDevice calls are
fixed but this commit also fixes one other call. While the call is
slightly related to this series qemuDomainDetachExtensionDevice properly
handles return from qemuMonitorDelDevice and thus changing return value
from there would not impact the code.

ACK if you mention qemuDomainDetachExtensionDevice
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190312/1a53dd47/attachment-0001.sig>


More information about the libvir-list mailing list