mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemu: qemuProcessDetectIOThreadPIDs invert checks
If we received zero iothreads from the monitor, but were perhaps expecting to receive something, then the code was skipping the check to ensure what's in the monitor matches our expectations. So invert the checks to check that what we get back matches expectations and then check there are zero iothreads returned.
This commit is contained in:
@@ -2233,12 +2233,6 @@ qemuProcessDetectIOThreadPIDs(virQEMUDriverPtr driver,
|
||||
if (niothreads < 0)
|
||||
goto cleanup;
|
||||
|
||||
/* Nothing to do */
|
||||
if (niothreads == 0) {
|
||||
ret = 0;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (niothreads != vm->def->iothreads) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("got wrong number of IOThread pids from QEMU monitor. "
|
||||
@@ -2247,6 +2241,12 @@ qemuProcessDetectIOThreadPIDs(virQEMUDriverPtr driver,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* Nothing to do */
|
||||
if (niothreads == 0) {
|
||||
ret = 0;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
for (i = 0; i < niothreads; i++) {
|
||||
virDomainIOThreadIDDefPtr iothrid;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user