[PATCH BlueZ 4/8] shared/shell: Set NON_INTERACTIVE env

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

 



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

This sets NON_INTERACTIVE environment variable which applications can
then use to query under what mode they are running.
---
 src/shared/shell.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/shared/shell.c b/src/shared/shell.c
index 0f6d613bd..85657c250 100644
--- a/src/shared/shell.c
+++ b/src/shared/shell.c
@@ -818,6 +818,9 @@ void bt_shell_init(int argc, char **argv, const struct bt_shell_opt *opt)
 	data.argv = argv + optind;
 	data.mode = (data.argc > 0);
 
+	if (data.mode)
+		bt_shell_set_env("NON_INTERACTIVE", &data.mode);
+
 	main_loop = g_main_loop_new(NULL, FALSE);
 
 	rl_init();
-- 
2.14.3

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