From 7d59391bb783c60f15803f97860094a6817894b2 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Thu, 5 Jun 2025 14:07:25 -0400 Subject: [PATCH] shared/shell: Add support for -EINPROGRESS to bt_shell_noninteractive_quit This enables commands to call bt_shell_noninteractive_quit with status set to -EINPROGRESS to indicate their execution is in progress and shall not exit in case of MODE_NONINTERACTIVE but it can proceed to the next command for MODE_INTERACTIVE. --- src/shared/shell.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/shared/shell.c b/src/shared/shell.c index 3e5959fc1..6b4f7a7ef 100644 --- a/src/shared/shell.c +++ b/src/shared/shell.c @@ -1560,6 +1560,12 @@ void bt_shell_noninteractive_quit(int status) return; } + /* Ignore EINPROGRESS as it is meant for commands that need to stay + * running. + */ + if (status == -EINPROGRESS) + return; + bt_shell_quit(status); } -- 2.47.3