]> git.ipfire.org Git - thirdparty/libvirt.git/commit
report error when virProcessGetStatInfo() is unable to parse data
authorAni Sinha <ani@anisinha.ca>
Tue, 11 Jan 2022 10:20:43 +0000 (15:50 +0530)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 12 Jan 2022 13:18:38 +0000 (14:18 +0100)
commit938382b60ae5bd1f83b5cb09e1ce68b9a88f679a
treef4cd886f5941ad95be8af77baa6561ef1cafc369
parent7cd0e26c81852b089c44c2840dd7051c0c811a29
report error when virProcessGetStatInfo() is unable to parse data

Currently virProcessGetStatInfo() always returns success and only logs error
when it is unable to parse the data. Make this function actually report the
error and return a negative value in this error scenario.

Fix the callers so that they do not override the error generated.
Also fix non-linux implementation of this function so as to report error.

Signed-off-by: Ani Sinha <ani@anisinha.ca>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/ch/ch_driver.c
src/qemu/qemu_driver.c
src/util/virprocess.c