]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r345066, r347219-r347220, r347223, r347388-r347389, r347391, r347393,
authorKyle Evans <kevans@FreeBSD.org>
Thu, 24 Oct 2019 03:01:40 +0000 (03:01 +0000)
committerKyle Evans <kevans@FreeBSD.org>
Thu, 24 Oct 2019 03:01:40 +0000 (03:01 +0000)
commitd70c1f79ed30a35c45e7229114803a92104fd5bf
treeb296f24d1863d14098088aa3fca44c9962b54892
parent54f346e543c2b223125c28773cd2059aece9559b
MFC r345066, r347219-r347220, r347223, r347388-r347389, r347391, r347393,
r347553, r348040

r345066:
stand: Improve some debugging experience

Some of these files using <FOO>_DEBUG defined a DEBUG() macro to serve as a
debug-printf. -DDEBUG is useful to enable some debugging output across
multiple ELF/common parts, so switch the DEBUG-as-printf macros over to
something more like DPRINTF that is more commonly used for this kind of
thing and less likely to conflict.

userboot/elf64_freebsd debugging also assumed %llx for uint64; use PRIx64
instead.

r347219:
loader: use safer DPRINTF body for non-debug case

r347220:
loader: bcache code does not need to check argument for free()

r347223:
command_bcache() does not use argv

Therefore mark argv __unused.

r347388:
loader: implement proper 8 char tab stops

The current console code is printing out 8 spaces for tab, calculate
the amount of spaces based on tab stops.

r347389:
loader: ptable_print() needs two tabs sometimes

Since the partition/slice names do vary in length, check the length
of the fixed part of the line against 3 * 8, if the lenth is less than
3 tab stops, print out extra tab.

use snprintf() instead of sprintf.

r347391:
loader: no-TERM_EMU is broken now

If TERM_EMU is not defined, we do not have curx variable. Use conout mode
for efi and expose get_pos() for i386.

r347393:
loader: use DPRINTF in biosdisk.c and define safe DPRINTF

r345066 did miss biosdisk.c.

Also define DPRINTF as ((void)0) for case we do not want debug printouts.

r347553:
loader: fix memory handling errors in module.c

file_loadraw():
check for file_alloc() and strdup() results.
we leak 'name'.

mod_load() does leak 'filename'.

mod_loadkld() does not need to check fp, file_discard() does check.

r348040:
stand: TARGET_ARCH is spelled MACHINE_ARCH in Makefiles
stand/common/bcache.c
stand/common/disk.c
stand/common/interp_forth.c
stand/common/module.c
stand/common/part.c
stand/efi/libefi/efi_console.c
stand/i386/libi386/biosdisk.c
stand/i386/libi386/vidconsole.c
stand/powerpc/Makefile
stand/userboot/userboot/elf64_freebsd.c