All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ 4/8] shared/shell: Set NON_INTERACTIVE env
Date: Wed, 21 Feb 2018 16:14:52 +0200	[thread overview]
Message-ID: <20180221141456.6656-4-luiz.dentz@gmail.com> (raw)
In-Reply-To: <20180221141456.6656-1-luiz.dentz@gmail.com>

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

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


  parent reply	other threads:[~2018-02-21 14:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-21 14:14 [PATCH BlueZ 1/8] shared/shell: Add non-interactive mode Luiz Augusto von Dentz
2018-02-21 14:14 ` [PATCH BlueZ 2/8] tools/bluetooth-player: Only enable attach input when connected Luiz Augusto von Dentz
2018-02-21 14:14 ` [PATCH BlueZ 3/8] tools/obexctl: " Luiz Augusto von Dentz
2018-02-21 14:14 ` Luiz Augusto von Dentz [this message]
2018-02-21 14:14 ` [PATCH BlueZ 5/8] client: Don't auto register agent on non-interactive mode Luiz Augusto von Dentz
2018-02-21 14:14 ` [PATCH BlueZ 6/8] shared/mainloop: Add GLIB wrapper Luiz Augusto von Dentz
2018-02-21 14:14 ` [PATCH BlueZ 7/8] shared/util: Add strdelimit and strsuffix Luiz Augusto von Dentz
2018-02-21 14:14 ` [PATCH BlueZ 8/8] shared/shell: Use mainloop wrappers instead of GLIB directly Luiz Augusto von Dentz
2018-02-22  9:56 ` [PATCH BlueZ 1/8] shared/shell: Add non-interactive mode Luiz Augusto von Dentz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180221141456.6656-4-luiz.dentz@gmail.com \
    --to=luiz.dentz@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.