mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-27 06:04:32 +08:00
android: Add simple rotation of snoop file
Already existing snoop file is renamed by adding ".old" suffix before new one is created. This is useful in case phone is restarted so logs are not overwritten and for this reason it's only applied in case default snoop file name is used.
This commit is contained in:
parent
e76815ac82
commit
1ff2c28807
@ -206,6 +206,9 @@ int main(int argc, char *argv[])
|
||||
|
||||
mainloop_set_signal(&mask, signal_callback, NULL, NULL);
|
||||
|
||||
if (!strcmp(DEFAULT_SNOOP_FILE, path))
|
||||
rename(DEFAULT_SNOOP_FILE, DEFAULT_SNOOP_FILE ".old");
|
||||
|
||||
if (open_monitor(path) < 0) {
|
||||
printf("Failed to start bluetoothd_snoop\n");
|
||||
return EXIT_FAILURE;
|
||||
|
Loading…
Reference in New Issue
Block a user