[PATCH BlueZ 2/9] shared/shell: Fix parsing of optional parameters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>

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.13.6

--
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



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux