public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ v1 1/2] shared/shell: Add support for -EINPROGRESS to bt_shell_noninteractive_quit
@ 2025-06-05 18:15 Luiz Augusto von Dentz
  2025-06-05 18:15 ` [PATCH BlueZ v1 2/2] client: Use -EINPROGRESS with scan and advertise command Luiz Augusto von Dentz
  2025-06-05 19:11 ` [BlueZ,v1,1/2] shared/shell: Add support for -EINPROGRESS to bt_shell_noninteractive_quit bluez.test.bot
  0 siblings, 2 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2025-06-05 18:15 UTC (permalink / raw)
  To: linux-bluetooth

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

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 3e5959fc1868..6b4f7a7ef503 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.49.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-06-05 19:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-05 18:15 [PATCH BlueZ v1 1/2] shared/shell: Add support for -EINPROGRESS to bt_shell_noninteractive_quit Luiz Augusto von Dentz
2025-06-05 18:15 ` [PATCH BlueZ v1 2/2] client: Use -EINPROGRESS with scan and advertise command Luiz Augusto von Dentz
2025-06-05 19:11 ` [BlueZ,v1,1/2] shared/shell: Add support for -EINPROGRESS to bt_shell_noninteractive_quit bluez.test.bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox