mirror of https://gitee.com/openkylin/libvirt.git
qemu: Report error on unexpected job stats type
If we ever fail to properly set jobinfo->statsType, qemuDomainJobInfoToParams would return -1 without setting an error. Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
43b0b4f834
commit
57d90e3e05
|
@ -730,6 +730,12 @@ qemuDomainJobInfoToParams(qemuDomainJobInfoPtr jobInfo,
|
||||||
return qemuDomainDumpJobInfoToParams(jobInfo, type, params, nparams);
|
return qemuDomainDumpJobInfoToParams(jobInfo, type, params, nparams);
|
||||||
|
|
||||||
case QEMU_DOMAIN_JOB_STATS_TYPE_NONE:
|
case QEMU_DOMAIN_JOB_STATS_TYPE_NONE:
|
||||||
|
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||||
|
_("invalid job statistics type"));
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
virReportEnumRangeError(qemuDomainJobStatsType, jobInfo->statsType);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue