From 2404a099f6f980dc22a4a5234ed261a760c4efbe Mon Sep 17 00:00:00 2001 From: ERAMOTO Masaya Date: Mon, 23 Oct 2017 17:28:30 +0900 Subject: [PATCH] tools/btmgmt: Change help message of some commands to usage 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 ee2cb18b9..8eee2b1e3 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.47.3