freebsd-dev/sys/boot/i386
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 Allow Clang's integrated assembler to assemble boot0 2017-06-23 18:41:49 +00:00
boot0sio META_MODE: Remove DEP_MACHINE from Makefile.depend files. 2015-09-25 19:44:01 +00:00
boot2 Revert r321969 2017-08-03 13:50:46 +00:00
btx loader: disk io should not use alloca() 2017-02-06 18:44:15 +00:00
cdboot cdboot: add explict suffix to ambiguous or instruction 2016-12-28 23:02:01 +00:00
common loader: zfs reader should check all labels 2017-04-06 18:17:29 +00:00
gptboot Implement boot-time encryption key passing (keybuf) 2017-04-01 05:05:22 +00:00
gptzfsboot Use NO_WCAST_ALIGN instead of spelling it out as -Wno-cast-align in CFLAGS 2017-03-28 20:30:33 +00:00
kgzldr META MODE: Update dependencies with 'the-lot' and add missing directories. 2015-12-01 05:23:19 +00:00
libfirewire dosfs support in libstand is broken since r298230 2016-12-30 19:06:29 +00:00
libi386 loader: chain load relocate data declaration is bad 2017-06-29 04:33:55 +00:00
loader loader: chain load relocate data declaration is bad 2017-06-29 04:33:55 +00:00
mbr Don't use -N to set the OMAGIC with data and text writeable and data 2016-09-03 15:26:28 +00:00
pmbr Don't use -N to set the OMAGIC with data and text writeable and data 2016-09-03 15:26:28 +00:00
pxeldr Followup on the user-class changes 2017-05-28 18:31:13 +00:00
zfsboot zfsboot: drvsize() may be unusable on some systems 2017-05-04 05:26:37 +00:00
zfsloader DIRDEPS_BUILD: Update dependencies. 2017-05-09 01:48:23 +00:00
boot.ldscript Don't use -N to set the OMAGIC with data and text writeable and data 2016-09-03 15:26:28 +00:00
Makefile Restore kgzldr on i386 only 2016-02-08 16:59:52 +00:00
Makefile.inc Back out the move to the loader script from -N. This should fix the 2016-10-26 05:26:58 +00:00