Re: [PATCH 1/4] android: Add simple rotation of snoop file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andrzej,

On Wednesday 15 of January 2014 22:01:36 Andrzej Kaczmarek wrote:
> 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.
> ---
>  android/bluetoothd-snoop.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/android/bluetoothd-snoop.c b/android/bluetoothd-snoop.c
> index 02f44e9..23e0bfd 100644
> --- a/android/bluetoothd-snoop.c
> +++ b/android/bluetoothd-snoop.c
> @@ -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;
> 

All patches in this set applied, thanks.
(after changing commits order to not break build in 1/4)

-- 
Best regards, 
Szymon Janc
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux