On Tue, Jul 01, 2014 at 02:10:07PM +0200, Rolf Evers-Fischer wrote: > > > On Tue, 1 Jul 2014, Sascha Hauer wrote: > > >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. > > Unfortunately it doesn't do what I want. If I invoke "boot -l" on the bb > shell, I get optind=argc=2. Therefore barebox executes the "else" clause, > which lists only the default bootsource. Right, but what else should the command list if you do not give additional arguments? I mean the intention is that boot -l <source1> <source2> lists all sources specified, whereas boot -l lists everything from $global.boot.default 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 barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox