]> git.ipfire.org Git - thirdparty/libvirt.git/commit
vsh: Add helper for safe remembering of libvirt errors
authorPeter Krempa <pkrempa@redhat.com>
Tue, 11 Apr 2017 15:23:23 +0000 (17:23 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 12 Apr 2017 12:11:52 +0000 (14:11 +0200)
commit4f4c3b1397c4b5d16af75ddf9e1f087844904655
tree608cb36d165624018c9493e6a8590d8afcae1bd4
parent010c8f0f26316cb66e47f927296308ef73f95325
vsh: Add helper for safe remembering of libvirt errors

Avoid the annoying issue where the public object freeing APIs overwrite
the error set by helper functions, since they don't invoke the callback.

The new helper remembers the error only if no previous error was set.
tools/virsh-util.c
tools/vsh.c
tools/vsh.h