batctl: Exit code is now EXIT_FAILURE when throughputmeter fails
Commit Message
Before this commit, this command completed indicating success:
[lemoer@orange batctl]$ (sudo batctl tp 77:77:77:77:77:77 && echo true) || echo false
Destination unreachable
true
After this commit, this command expectedly indicates failure:
[lemoer@orange batctl]$ (sudo ./batctl tp 77:77:77:77:77:77 && echo true) || echo false
Destination unreachable
false
Signed-off-by: Leonardo Mörlein <me@irrelefant.net>
---
throughputmeter.c | 1 +
1 file changed, 1 insertion(+)
@@ -465,6 +465,7 @@ static int throughputmeter(struct state *state, int argc, char **argv)
goto out;
}
+ ret = EXIT_FAILURE;
switch (result.return_value) {
case BATADV_TP_REASON_DST_UNREACHABLE:
fprintf(stderr, "Destination unreachable\n");