The puts functions now properly return the number of characters
written. With this we can also fix fprintf.
Also, remove never reached return in fputs.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
When building sandbox, barebox is built with -Dprintf=barebox_printf as
to not collide with the printf provided by libc. This would also match
the format(printf) function __attribute__.
Since gcc documents that __printf__ can be used instead of printf as a
format attribute, use this instead and avoid a lot of noisy warnings.
NB: this relates to 6b082cfe9f which was
an earlier attempt at solving this, which got reverted due to other
regressions.
Signed-off-by: Loïc Minier <loic.minier@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
While getting rid of all the format(barebox_printf) warnings was nice,
it caused the printf calls in arch/sandbox/os/common.c to get directed
to the barebox versions rather than the libc ones causing a crash:
E.G. before this revert:
nm -a barebox|grep -w printf
0000000000404fa3 T print
And after:
nm -a barebox|grep -w printf
U printf@@GLIBC_2.2.5
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This reverts commit 6b082cfe9f.
With sandbox printf is redefined as barebox_printf so that it does
not collide with the glibc printf. This leads to tons of
include/stdio.h:12:1: warning: ‘barebox_printf’ is an unrecognized format function type
warnings. This patch fixes this.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
We use FIFOs on some devices, so flush them before exiting so
we do not get funny characters in the output.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>