From: Sascha Hauer <s.hauer@pengutronix.de>
To: Marco Felsch <m.felsch@pengutronix.de>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH] usb: fastboot: increase max answer size to 256
Date: Tue, 27 Jan 2026 08:12:20 +0100 [thread overview]
Message-ID: <aXhlVIO0EW8LudEM@pengutronix.de> (raw)
In-Reply-To: <20260126135336.ewilribmhw2xtsnb@pengutronix.de>
On Mon, Jan 26, 2026 at 02:53:36PM +0100, Marco Felsch wrote:
> Hi Sascha,
>
> On 26-01-26, Sascha Hauer wrote:
>
> ..
> > While at it use a define for the maximum answer length to avoid
> > repeating the hardcoded number. Also allow the answer to be exactly
> > the maximum length. Previous implementation used a 64 byte string
> > which included the '\0' string end and limited the usable size to
> > 63 bytes. Now we can use the full 256 bytes.
>
> ...
>
> > +#define FASTBOOT_MAX_RESPONSE_SIZE 256
> > +
> > int fastboot_tx_print(struct fastboot *fb, enum fastboot_msg_type type,
> > const char *fmt, ...)
> > {
> > struct va_format vaf;
> > - char buf[64];
> > + char buf[FASTBOOT_MAX_RESPONSE_SIZE + 1];
>
> So the new size of 256 bytes don't include the '\0' at the end?
We need the '\0' for printing the string with pr_info(), but it doesn't
go over the wire.
>
> In that case feel free to add my:
>
> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
Thanks
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2026-01-27 7:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-26 13:04 Sascha Hauer
2026-01-26 13:53 ` Marco Felsch
2026-01-27 7:12 ` Sascha Hauer [this message]
2026-01-27 7:22 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aXhlVIO0EW8LudEM@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=m.felsch@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox