Yes, it makes sense, thanks for the explanation,

On Tue, Oct 8, 2013 at 3:47 PM, Ben Pfaff <[email protected]> wrote:

> 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
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to