提交 0ff84542 编写于 作者: M Michal Privoznik

test_driver: Don't report VIR_DOMAIN_DISK_ERROR_NONE

In my review of 89320788 I've simplified assigning disk errors
too much as the code I've changed it to will set
VIR_DOMAIN_DISK_ERROR_NONE. This is in contradiction with our
documentation which specifies that disks with no errors are not
reported.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
上级 3b1a5dde
......@@ -3277,7 +3277,7 @@ static int testDomainGetDiskErrors(virDomainPtr dom,
for (i = 0; i < MIN(vm->def->ndisks, maxerrors); i++) {
if (VIR_STRDUP(errors[i].disk, vm->def->disks[i]->dst) < 0)
goto cleanup;
errors[i].error = i % VIR_DOMAIN_DISK_ERROR_LAST;
errors[i].error = (i % (VIR_DOMAIN_DISK_ERROR_LAST - 1)) + 1;
}
ret = i;
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册