On Tue, Oct 08, 2013 at 02:02:28PM -0700, Alex Wang wrote: > + case 'a': > > + if (!fstat(fileno(file), &s) && !s.st_size) { > > + pcap_write_header(file); > > + } > > + break; > > + > > + default: > > + NOT_REACHED(); > > } > > > > Here, why do we check the (!st_size)? don't we allow append to empty file?
We can append to an empty file, but if the file isn't empty then we shouldn't try to write a pcap file header at the beginning. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev