]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virFileRewrite: Move error reporting into callback
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 9 Feb 2022 12:43:19 +0000 (13:43 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 11 Feb 2022 12:57:44 +0000 (13:57 +0100)
commitd295c1425826614abca85a37999c2a5b9e7388de
tree06f2f76ca6bfc20e7bbd7825cfb9ef9ea1f21e7c
parent04ed2518501a9de96e08fca3147d1a8a3cdd6776
virFileRewrite: Move error reporting into callback

When rewriting a file using virFileRewrite() and error occurs
while writing into a temporary file it's actually the callback
that can report the most accurate error. Move error reporting
into very few callback we have currently. Those callbacks are
trivial so the benefit of this change is not obvious, but this
will change shortly when slightly more complicated callback is
introduced.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/util/virfile.c
src/util/virfile.h
src/util/virxml.c