Display the usage including the command name even if passing an invalid argument. --- tools/btmgmt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/btmgmt.c b/tools/btmgmt.c index ee2cb18..8eee2b1 100644 --- a/tools/btmgmt.c +++ b/tools/btmgmt.c @@ -1790,7 +1790,7 @@ done: static bool parse_setting(int argc, char **argv, uint8_t *val) { if (argc < 2) { - print("Specify \"on\" or \"off\""); + cmd_usage(argv[0]); return false; } @@ -1893,7 +1893,7 @@ static void cmd_sc(struct mgmt *mgmt, uint16_t index, int argc, char **argv) uint8_t val; if (argc < 2) { - print("Specify \"on\" or \"off\" or \"only\""); + cmd_usage(argv[0]); return noninteractive_quit(EXIT_FAILURE); } -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html