[PATCH 0/4] Small fixes in barebox

Alexander Aring alex.aring at gmail.com
Thu Feb 7 16:47:46 EST 2013


Hi Sascha,

On Thu, Feb 07, 2013 at 10:35:24PM +0100, Sascha Hauer wrote:
> On Thu, Feb 07, 2013 at 09:36:16PM +0100, Alexander Aring wrote:
> > First I tried to change getopt optstring argument to "const char *"
> > and I test it with an allyesconfig for compiler warnings.
> > 
> > Then there popup some compile errors, which I tried to fix.
> > 
> > I am not happy with some of these solutions. Maybe someone have an idea
> > how we can make it better.
> > 
> > hush: add getopt only if it enabled
> >  - I don't know if this needs a fix. But if we disable getopt there is a
> >    no-op getopt implementation in the command list. This patch don't add
> >    getopt to the command list at runtime, but the no-op implementation is
> >    still there. Maybe a compiletime solution is better to remove the
> >    no-op implementation.
> 
> I don't understand. getopt is not there if CONFIG_HUSH_GETOPT is
> disabled. It's ifdeffed out.
> 

Yes it's ifdeffed out with an empty no-op getopt implementation. But
this will be add to the barebox command list.

So if we type "getopt" we don't get a "Unknown command" message, barebox
run only a no-op getopt implementation.

This patch will don't add getopt to the command list if we don't enable
it. I let the no-op getopt implementation there, otherwise we get a
compiler warning.

Regards
Alex




More information about the barebox mailing list