From 1e54e8bd0b737fa3cf7110d3850630d99f721714 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Mon, 12 Jul 2010 19:14:59 -0300 Subject: [PATCH] hcidump: Remove support for noappend option --- tools/hcidump.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/tools/hcidump.c b/tools/hcidump.c index c82c52c2f..4e0f369bc 100644 --- a/tools/hcidump.c +++ b/tools/hcidump.c @@ -83,7 +83,6 @@ enum { static int snap_len = SNAP_LEN; static int mode = PARSE; static int permcheck = 1; -static int noappend = 0; static char *dump_file = NULL; static char *pppdump_file = NULL; static char *audio_file = NULL; @@ -474,12 +473,9 @@ static int open_file(char *file, int mode, unsigned long flags) struct btsnoop_hdr *hdr = (struct btsnoop_hdr *) buf; int fd, len, open_flags; - if (mode == WRITE || mode == PPPDUMP || mode == AUDIO) { - if (noappend || flags & DUMP_BTSNOOP) - open_flags = O_WRONLY | O_CREAT | O_TRUNC; - else - open_flags = O_WRONLY | O_CREAT | O_APPEND; - } else + if (mode == WRITE || mode == PPPDUMP || mode == AUDIO) + open_flags = O_WRONLY | O_CREAT | O_TRUNC; + else open_flags = O_RDONLY; fd = open(file, open_flags, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); @@ -882,7 +878,6 @@ static void usage(void) " -B, --btsnoop Use BTSnoop file format\n" " -V, --verbose Verbose decoding\n" " -Y, --novendor No vendor commands or events\n" - " -N, --noappend No appending to existing files\n" " -4, --ipv4 Use IPv4 as transport\n" " -6 --ipv6 Use IPv6 as transport\n" " -h, --help Give this help list\n" @@ -913,7 +908,6 @@ static struct option main_options[] = { { "verbose", 0, 0, 'V' }, { "novendor", 0, 0, 'Y' }, { "nopermcheck", 0, 0, 'Z' }, - { "noappend", 0, 0, 'N' }, { "ipv4", 0, 0, '4' }, { "ipv6", 0, 0, '6' }, { "help", 0, 0, 'h' }, @@ -1027,10 +1021,6 @@ int main(int argc, char *argv[]) permcheck = 0; break; - case 'N': - noappend = 1; - break; - case '4': af = AF_INET; break; -- 2.47.3