On Wed, Feb 20, 2019 at 03:24:56PM +0100, Andrea Bolognani wrote:
Changes from [v3]:
* Make sure errors from virFileWrapperFdClose() result in an
overall failure being bubbled up;
* don't call virReportError() unless the function is going to
report the failure through its return code as well;
* revert b0c3e931804a more thoroughly.
Changes from [v2]:
* Move error reporting from virFileWrapperFdFree() to
virFileWrapperFdClose().
Changes from [v1]:
* Use VIR_FREE() followed by VIR_ALLOC_N() instead of manually
setting the last (and only) byte of the array returned by
VIR_REALLOC_N() to zero.
[v3]
https://www.redhat.com/archives/libvir-list/2019-February/msg01069.html
[v2]
https://www.redhat.com/archives/libvir-list/2019-February/msg00782.html
[v1]
https://www.redhat.com/archives/libvir-list/2019-February/msg00156.html
Andrea Bolognani (4):
util: Make it safe to call virFileWrapperFdClose() multiple times
qemu: Always call virFileWrapperFdClose()
util: Move error reporting back to virFileWrapperFdClose()
util: Report error in virFileWrapperFdClose()
src/qemu/qemu_driver.c | 16 ++++++++++------
src/util/virfile.c | 22 ++++++++++++++++------
2 files changed, 26 insertions(+), 12 deletions(-)
Reviewed-by: Ján Tomko <jtomko(a)redhat.com>
Jano