[PATCH] common: fastboot: send FAIL if variable does not exist
Sascha Hauer
s.hauer at pengutronix.de
Mon Jun 23 07:04:08 PDT 2025
On Thu, Jun 12, 2025 at 04:19:36PM +0200, Andrei Lalaev wrote:
> On 12.06.2025 10:08, Sascha Hauer wrote:
> > Hi Andrei,
> >
> > On Wed, Jun 11, 2025 at 07:56:45PM +0200, Andrei Lalaev wrote:
> >> According to doc [1], new implementations should send FAIL if the
> >> variable specified in the getvar command does not exist.
> >>
> >> [1]: https://android.googlesource.com/platform/system/core/+show/refs/heads/main/fastboot/README.md#121
> >>
> >> Signed-off-by: Andrei Lalaev <andrey.lalaev at gmail.com>
> >> ---
> >> common/fastboot.c | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/common/fastboot.c b/common/fastboot.c
> >> index 56bc4e82c4..3df3c227a3 100644
> >> --- a/common/fastboot.c
> >> +++ b/common/fastboot.c
> >> @@ -372,7 +372,7 @@ static void cb_getvar(struct fastboot *fb, const char *cmd)
> >> goto out;
> >>
> >> skip_partitions:
> >> - fastboot_tx_print(fb, FASTBOOT_MSG_OKAY, "");
> >> + fastboot_tx_print(fb, FASTBOOT_MSG_FAIL, "");
> >
> > With this a "fastboot getvar all" fails.
> >
> > I fixed this up as below.
> >
> > Sascha
>
> Hi,
>
> Thanks a lot for the fix!
> To be honest, I had only checked the original patch on Barebox 2025.02 and then
> just backported it to the latest master :/
>
> Would you be willing to take primary authorship for this commit?
> Since you've reworked it completely, I think that would be more appropriate.
I would have done it if I had read your response in time ;)
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 |
More information about the barebox
mailing list