On Mon, Jun 30, 2014 at 02:21:39PM +0200, Rolf Evers-Fischer wrote:
> This patch fixes the presentation of all bootsources with 'boot -m' and
> 'boot -l' command.
> 
> Signed-off-by: Rolf Evers-Fischer <[email protected]>
> ---
>  commands/boot.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/commands/boot.c b/commands/boot.c
> index c8eae10..1a1856d 100644
> --- a/commands/boot.c
> +++ b/commands/boot.c
> @@ -433,12 +433,12 @@ static int do_boot(int argc, char *argv[])
>         }
> 
>         if (do_list) {
> -               bootsources_list(sources, num_sources);
> +               bootsources_list(&argv[optind], argc - optind);
>                 goto out;
>         }
> 
>         if (do_menu) {
> -               bootsources_menu(sources, num_sources);
> +               bootsources_menu(&argv[optind], argc - optind);
>                 goto out;
>         }

What exactly fixes this? Looking at the code we have:

        if (optind < argc) {
                num_sources = argc - optind;
                sources = xmemdup(&argv[optind], sizeof(char *) *num_sources);
        } else {
                ...
        }

Which should do what you want. On which barebox version are you?

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to