summaryrefslogtreecommitdiff
path: root/src/ch
diff options
context:
space:
mode:
authorMichal Privoznik <mprivozn@redhat.com>2023-01-18 09:03:29 +0100
committerMichal Privoznik <mprivozn@redhat.com>2023-01-23 16:16:03 +0100
commit818c9717c53446ca7abbaa7b3fd7925e1c5ab663 (patch)
treefc88462f33fc48e05cab3ea3bf860746c02571a8 /src/ch
parent1c7476c8797b7f0d6e8d607f6a42c5bf43441677 (diff)
downloadlibvirt-818c9717c53446ca7abbaa7b3fd7925e1c5ab663.tar.gz
src: Don't use virReportSystemError() on virProcessGetStatInfo() failure
Firstly, the virProcessGetStatInfo() does not fail really. But even if it did, it sets correct errno only sometimes (and even that is done in a helper it's calling - virProcessGetStat() and even there it's the case only in very few error paths). Therefore, using virReportSystemError() to report errors is very misleading. Use plain virReportError() instead. Luckily, there are only two places where the former was used: chDomainHelperGetVcpus() and qemuDomainHelperGetVcpus() (not a big surprise since CH driver is heavily inspired by QEMU driver). Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Diffstat (limited to 'src/ch')
-rw-r--r--src/ch/ch_driver.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ch/ch_driver.c b/src/ch/ch_driver.c
index db2a66d131..12fbe31c24 100644
--- a/src/ch/ch_driver.c
+++ b/src/ch/ch_driver.c
@@ -1079,8 +1079,8 @@ chDomainHelperGetVcpus(virDomainObj *vm,
NULL, NULL,
&vcpuinfo->cpu, NULL,
vm->pid, vcpupid) < 0) {
- virReportSystemError(errno, "%s",
- _("cannot get vCPU placement & pCPU time"));
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("cannot get vCPU placement & pCPU time"));
return -1;
}
}