Re: [PATCH v5 03/15] pkt-line: add `gentle` parameter to format_packet()
- From
Lars Schneider <larsxschneider@gmail.com>
- Date
- Aug 10, 2016, 13:29 UTC
- Message-ID
- <F4D9C42A-5B7F-47B4-B334-704D5F6210F5@gmail.com>
- In-Reply-To
- <20160810131541.ovpvgwdxjibae5gy@sigill.intra.peff.net>
Show 17 quoted lines
> On 10 Aug 2016, at 15:15, Jeff King <peff@peff.net> wrote: > > On Wed, Aug 10, 2016 at 03:03:59PM +0200, larsxschneider@gmail.com wrote: > >> From: Lars Schneider <larsxschneider@gmail.com> >> >> format_packet() dies if the caller wants to format a packet larger than >> LARGE_PACKET_MAX. Certain callers might prefer an error response instead. > > I am not sure I agree here. Certainly I see the usefulness of gently > handling a failure to write(). But if you are passing in too-large > buffers, isn't that a bug in the program? > > How would you recover, except by splitting up the content? That might > not be possible depending on how you are using the pkt-lines. And even > if it is, wouldn't it be simpler to split it up before sending it to > format_packet()?
Good argument. I agree - this patch should be dropped.
Thanks, Lars