From 419cd859d72cbf5885a6131cb595e8b998fad083 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Tue, 12 Dec 2017 14:06:46 -0200 Subject: [PATCH] shared/shell: Fix parsing of optional parameters Optional parameters uses "[]" delimiters. --- src/shared/shell.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/shell.c b/src/shared/shell.c index b4fdf7043..6cdea1c7e 100644 --- a/src/shared/shell.c +++ b/src/shared/shell.c @@ -288,9 +288,9 @@ static int cmd_exec(const struct bt_shell_menu_entry *entry, opt = strdup(entry->arg + len + 1); optional: - if (parse_args(opt, &w, "<>", flags) < 0) { + if (parse_args(opt, &w, "[]", flags) < 0) { print_text(COLOR_HIGHLIGHT, - "Unable to parse mandatory command arguments"); + "Unable to parse optional command arguments"); return -EINVAL; } -- 2.47.3