K 10 svn:author V 6 kevans K 8 svn:date V 27 2019-10-24T03:01:40.614683Z K 7 svn:log V 1828 MFC r345066, r347219-r347220, r347223, r347388-r347389, r347391, r347393, r347553, r348040 r345066: stand: Improve some debugging experience Some of these files using _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 END