Hi Mike, On Sun, Feb 26, 2012 at 1:04 PM, Mike Frysinger <vap...@gentoo.org> wrote: > On Wednesday 15 February 2012 18:51:18 Simon Glass wrote: >> --- a/arch/sandbox/cpu/os.c >> +++ b/arch/sandbox/cpu/os.c >> >> +#include <stdio.h> >> >> +void os_usage(int err) >> +{ >> + if (err < 0) >> + fprintf(stderr, "Try `--help' for more information.\n"); >> + fprintf(err < 0 ? stderr : stdout, "u-boot, " >> + "a command line test interface to U-Boot\n\n" >> + "usage:\tu-boot [-ch]\n" >> + "Options:\n" >> + "\t-h\tDisplay help\n" >> + "\t-c <command>\tExecute U-Boot command\n"); > > this actually doesn't work. we're using the stdio from u-boot itself, so we > can't use stdio.h from glibc. if it works for you, i'm pretty sure it's > purely an accident (perhaps related to the fortification change i just > posted).
>From memory this actually used U-Boot's fprintf, not stdio's, but I can't really remember why it worked. Given your efforts on the cmdline parsing I'm beginning to think we should perhaps add os_printf() and os_printf_stderr() and provide an explicit interface. It might only be useful prior to main(), then again I'm not so sure. > -mike Regards, Simon _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot