From: Jerzy Kasenberg <jerzy.kasenberg@tieto.com>
To: <linux-bluetooth@vger.kernel.org>
Cc: Jerzy Kasenberg <jerzy.kasenberg@tieto.com>
Subject: [PATCH 2/2] android/client: Add processing of .haltestrc
Date: Thu, 24 Oct 2013 14:46:47 +0200 [thread overview]
Message-ID: <1382618807-14605-3-git-send-email-jerzy.kasenberg@tieto.com> (raw)
In-Reply-To: <1382618807-14605-1-git-send-email-jerzy.kasenberg@tieto.com>
This patch allows tool to read commands from .haltestrc.
So it is possible to call some functions that are typically used.
So user can have:
adapter init
adapter get_profile_interface socket
adapter get_profile_interface pan
adapter get_profile_interface hidhost
adapter get_profile_interface a2dp
pan init
av init
---
android/client/haltest.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/android/client/haltest.c b/android/client/haltest.c
index efed16e..45fe724 100644
--- a/android/client/haltest.c
+++ b/android/client/haltest.c
@@ -314,6 +314,8 @@ static void stdin_handler(struct pollfd *pollfd)
int main(int argc, char **argv)
{
+ struct stat rcstat;
+
terminal_setup();
history_restore(".haltest_history");
@@ -321,6 +323,9 @@ int main(int argc, char **argv)
/* Register command line handler */
poll_register_fd(0, POLLIN, stdin_handler);
+ if (stat(".haltestrc", &rcstat) == 0 && (rcstat.st_mode & S_IFREG) != 0)
+ process_file(".haltestrc");
+
poll_dispatch_loop();
return 0;
--
1.7.9.5
prev parent reply other threads:[~2013-10-24 12:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-24 12:46 [PATCH 0/2] Add basic scripting to haltest Jerzy Kasenberg
2013-10-24 12:46 ` [PATCH 1/2] android/client: Add source command " Jerzy Kasenberg
2013-10-25 10:36 ` Luiz Augusto von Dentz
2013-10-24 12:46 ` Jerzy Kasenberg [this message]
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=1382618807-14605-3-git-send-email-jerzy.kasenberg@tieto.com \
--to=jerzy.kasenberg@tieto.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox