freebsd-nq/sys/boot/arm/at91
Enji Cooper 1ef2a611de Revert r321969
My change had good intentions, but the implementation was incorrect:
- printf was returning the number of characters in the format string
  plus the NUL, but failed in two regards implementation wise:
-- the pathological case, printf(""), wasn't being handled properly since
   the pointer is always incremented, so the value returned would be
   off-by-one.
-- printf(3) reports the number of characters printed post-conversion via
   vfprintf, etc.
- putchar(3) should return the character printed or EOF, not the number
  of characters output to the screen.

My goal in making the change (again) was to increase parity, but as bde
pointed out these are freestanding functions, so they don't have to
conform to libc/POSIX. I argued that the functions should be named
differently since the implementation is different enough to warrant it
and to allow boot2 code to be usable when linked against sys/boot and
libstand and other libraries in base. I have no interest in pushing
this change forward more though, as the original concern I had behind
the change with zfsboottest was resolved in r321849 and r321852. The
next person that updates the toolchain gets to deal with the
inconsistency if it's flagged by a newer compiler.

MFC after:	1 month
Reported by:	ed, markj
2017-08-03 13:50:46 +00:00
..
boot0 Eliminate "no previous prototype for main" warnings. 2014-07-26 03:33:19 +00:00
boot0iic Eliminate "no previous prototype for main" warnings. 2014-07-26 03:33:19 +00:00
boot0spi Eliminate "no previous prototype for main" warnings. 2014-07-26 03:33:19 +00:00
boot2 RBX_ defines are in rbx.h, move it there. 2016-01-26 06:26:44 +00:00
bootiic sys/boot: spelling fixes in comments. 2016-04-30 00:26:38 +00:00
bootspi sys/boot: spelling fixes in comments. 2016-04-30 00:26:38 +00:00
libat91 Revert r321969 2017-08-03 13:50:46 +00:00
linker.cfg
Makefile
Makefile.inc