varlinkctl: when operating in --more mode, fail correcly on Varlink method error
authorLennart Poettering <lennart@poettering.net>
Sat, 11 May 2024 11:50:26 +0000 (13:50 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 22 May 2024 20:08:28 +0000 (22:08 +0200)
commitf5faf4ec5b2523d964565b7b8bcc79a2fb4cf3fc
tree14b23cf7954ab9d9cdb445646ba4e9b2ab3d6220
parenta925620f5fc906bfdbef5fb83f852fe355ef1ad2
varlinkctl: when operating in --more mode, fail correcly on Varlink method error

In varlink.c we generally do not make failing callback functions fatal,
since that should be up to the app. Hence, in case of varlinkctl (where
we want failures to be fatal), make sure to propagate the error back
explicitly.

Before this change a failing call to "varlinkctl --more call …" would result in
a zero exit code. With this it will correctly exit with a non-zero exit
code.
src/varlinkctl/varlinkctl.c
test/units/TEST-74-AUX-UTILS.varlinkctl.sh