[U-Boot] [RFC PATCH v2 11/20] fastboot: net: Change 'continue' so it matches USB fastboot
Joe Hershberger
joe.hershberger at ni.com
Thu May 3 20:58:23 UTC 2018
On Mon, Apr 30, 2018 at 3:32 AM, Alex Kiernan <alex.kiernan at gmail.com> wrote:
> Change the behaviour of 'continue' so that we simply exit the fastboot
> server and leave the caller to decide what to do next. This matches
> the USB fastboot behaviour.
Good, I was considering recommending this approach.
Acked-by: Joe Hershberger <joe.hershberger at ni.com>
>
> Signed-off-by: Alex Kiernan <alex.kiernan at gmail.com>
> ---
>
> Changes in v2: None
>
> net/fastboot.c | 13 +++----------
> 1 file changed, 3 insertions(+), 10 deletions(-)
>
> diff --git a/net/fastboot.c b/net/fastboot.c
> index cd09ada..ed13890 100644
> --- a/net/fastboot.c
> +++ b/net/fastboot.c
> @@ -218,8 +218,6 @@ static void fastboot_send(struct fastboot_header fb_header, char *fastboot_data,
> if (!strncmp("OKAY", response, 4)) {
> if (!strcmp("boot", cmd_string)) {
> boot_downloaded_image();
> - } else if (!strcmp("continue", cmd_string)) {
> - run_command(env_get("bootcmd"), CMD_FLAG_ENV);
> } else if (!strncmp("reboot", cmd_string, 6)) {
> /* Matches reboot or reboot-bootloader */
> do_reset(NULL, 0, 0, NULL);
> @@ -313,20 +311,15 @@ static void fb_erase(char *response)
> #endif
>
> /**
> - * Continues normal boot process by running "bootcmd". Writes
> + * Continues normal boot process by exiting fastboot server. Writes
> * to response.
> *
> * @param repsonse Pointer to fastboot response buffer
> */
> static void fb_continue(char *response)
> {
> - char *bootcmd;
> -
> - bootcmd = env_get("bootcmd");
> - if (bootcmd)
> - fastboot_okay(NULL, response);
> - else
> - fastboot_fail("bootcmd not set", response);
> + net_set_state(NETLOOP_SUCCESS);
> + fastboot_okay(NULL, response);
> }
>
> /**
> --
> 2.7.4
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot
More information about the U-Boot
mailing list