]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virCommandWait: Propagate dryRunCallback return value properly
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 4 Jul 2018 07:57:05 +0000 (09:57 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 25 Jul 2018 05:11:13 +0000 (07:11 +0200)
commitc1a75828e448eebdfb015a87a11ac220abb7f5ea
tree65fffd8a3a7f788675fa84ad76f6480f11f1a6bd
parentadfcbdff91767890a60b2034c604ad3e0c58c51b
virCommandWait: Propagate dryRunCallback return value properly

The documentation to virCommandWait() function states that if
@exitstatus is NULL and command finished with error -1 is
returned. In other words, if @dryRunCallback is set and returns
an error (by setting its @status argument to a nonzero value) we
must propagate this error properly honouring the documentation
(and also regular run).

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
src/util/vircommand.c