Print the usage and return a failure for unknown options.
Fixes: 57cc3c472a7d ("batctl: Introduce handler for JSON_* command types")
Signed-off-by: Sven Eckelmann <[email protected]>
---
genl_json.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/genl_json.c b/genl_json.c
index ee83ab2..356c5d7 100644
--- a/genl_json.c
+++ b/genl_json.c
@@ -593,6 +593,9 @@ int handle_json_query(struct state *state, int argc, char
**argv)
case 'h':
json_query_usage(state);
return EXIT_SUCCESS;
+ default:
+ json_query_usage(state);
+ return EXIT_FAILURE;
}
}
--
2.47.3