--- tools/btmgmt.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/btmgmt.c b/tools/btmgmt.c index 8eee2b1..552f744 100644 --- a/tools/btmgmt.c +++ b/tools/btmgmt.c @@ -4528,7 +4528,7 @@ static void cmd_select(struct mgmt *mgmt, uint16_t index, int argc, char **argv) { if (argc != 2) { - error("Usage: select <index>"); + cmd_usage(argv[0]); return; } @@ -4641,6 +4641,14 @@ static void cmd_usage(char *cmd) return; c = find_cmd(cmd, all_cmd, NELEM(all_cmd)); + if (!c && interactive) { + c = find_cmd(cmd, interactive_cmd, NELEM(interactive_cmd)); + if (!c) + return; + error("Usage: %s %s", cmd, c->arg ? : ""); + return; + } + if (!c) return; -- 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