summaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorZach Johnson <zachoverflow@google.com>2015-03-04 14:06:13 -0800
committerAndre Eisenbach <eisenbach@google.com>2015-03-16 16:51:48 -0700
commit04bb236d873005ccb5950cb8e8f1f348499e032e (patch)
treec2237bd95e57b0af23d5ee8d44af4731cf36c76b /main
parent1d8e6b8e7fcf6bc691be94a362030915ac15b23b (diff)
downloadandroid_system_bt-04bb236d873005ccb5950cb8e8f1f348499e032e.tar.gz
android_system_bt-04bb236d873005ccb5950cb8e8f1f348499e032e.tar.bz2
android_system_bt-04bb236d873005ccb5950cb8e8f1f348499e032e.zip
Reinstate btsnoop last log saving
Waited for the merge to complete before reworking the feature into the stack.
Diffstat (limited to 'main')
-rw-r--r--main/stack_config.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/main/stack_config.c b/main/stack_config.c
index 0175c085b..d71ee4457 100644
--- a/main/stack_config.c
+++ b/main/stack_config.c
@@ -26,6 +26,7 @@
const char *BTSNOOP_LOG_PATH_KEY = "BtSnoopFileName";
const char *BTSNOOP_TURNED_ON_KEY = "BtSnoopLogOutput";
+const char *BTSNOOP_SHOULD_SAVE_LAST_KEY = "BtSnoopSaveLog";
const char *TRACE_CONFIG_ENABLED_KEY = "TraceConf";
static config_t *config;
@@ -73,6 +74,10 @@ static bool get_btsnoop_turned_on(void) {
return config_get_bool(config, CONFIG_DEFAULT_SECTION, BTSNOOP_TURNED_ON_KEY, false);
}
+static bool get_btsnoop_should_save_last(void) {
+ return config_get_bool(config, CONFIG_DEFAULT_SECTION, BTSNOOP_SHOULD_SAVE_LAST_KEY, false);
+}
+
static bool get_trace_config_enabled(void) {
return config_get_bool(config, CONFIG_DEFAULT_SECTION, TRACE_CONFIG_ENABLED_KEY, false);
}
@@ -84,6 +89,7 @@ static config_t *get_all(void) {
const stack_config_t interface = {
get_btsnoop_log_path,
get_btsnoop_turned_on,
+ get_btsnoop_should_save_last,
get_trace_config_enabled,
get_all
};