summaryrefslogtreecommitdiffstats
path: root/main/bte_conf.c
diff options
context:
space:
mode:
authorAndre Eisenbach <eisenbach@google.com>2014-09-17 16:40:53 -0700
committerAndre Eisenbach <eisenbach@google.com>2014-09-17 16:44:59 -0700
commit311e88dd46311534c6fd1a25ec9c5c1da6d55ded (patch)
treeedb28dd505506ca2687705a875d66c408740d72c /main/bte_conf.c
parent24adb37e4106bf8544c7729d34451fdf2777c4dc (diff)
downloadandroid_system_bt-311e88dd46311534c6fd1a25ec9c5c1da6d55ded.tar.gz
android_system_bt-311e88dd46311534c6fd1a25ec9c5c1da6d55ded.tar.bz2
android_system_bt-311e88dd46311534c6fd1a25ec9c5c1da6d55ded.zip
Add ability to preserve existing snoop log
Currently a stack restart or device reboot will overwrite existing snoop logs when the stack restarts. This patch adds a new configuration file parameter "BtSnoopSaveLog" that, if enabled, will cause an existing snoop log to be renamed to "<snoop_file_name>.last" before a new snoop log is created. This will allow for easier debugging of crashes that involve a reboot or stack restart. Change-Id: I4f56204d31a6bf2e96058938e8616eb6dee7360b
Diffstat (limited to 'main/bte_conf.c')
-rw-r--r--main/bte_conf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/main/bte_conf.c b/main/bte_conf.c
index 45d8933b0..63ace862a 100644
--- a/main/bte_conf.c
+++ b/main/bte_conf.c
@@ -29,6 +29,7 @@
// TODO: eliminate these global variables.
extern char hci_logfile[256];
extern BOOLEAN hci_logging_enabled;
+extern BOOLEAN hci_save_log;
extern BOOLEAN trace_conf_enabled;
void bte_trace_conf_config(const config_t *config);
@@ -47,6 +48,7 @@ void bte_load_conf(const char *path) {
strlcpy(hci_logfile, config_get_string(config, CONFIG_DEFAULT_SECTION, "BtSnoopFileName", ""), sizeof(hci_logfile));
hci_logging_enabled = config_get_bool(config, CONFIG_DEFAULT_SECTION, "BtSnoopLogOutput", false);
+ hci_save_log = config_get_bool(config, CONFIG_DEFAULT_SECTION, "BtSnoopSaveLog", false);
trace_conf_enabled = config_get_bool(config, CONFIG_DEFAULT_SECTION, "TraceConf", false);
bte_trace_conf_config(config);