summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJacob Garber <jgarber1@ualberta.ca>2019-07-03 14:40:11 -0600
committerNico Huber <nico.h@gmx.de>2019-07-04 21:45:41 +0000
commitb19946cc627b3c027a527bc51cfe2e08ead46b07 (patch)
treed54728c31c2f4f651f3dda09d228a41a8591c528 /src
parent7b2a88901f84f5dbdd03d6570262207726ad361a (diff)
downloadcoreboot-b19946cc627b3c027a527bc51cfe2e08ead46b07.tar.xz
console: Remove support for printing extra bases
vtxprintf() can only print numbers in base 8, 10, and 16, so the extra letters in the alphabet aren't needed. Change-Id: I6a51c13f3298a597e801440f86bf698bdd8c736a Signed-off-by: Jacob Garber <jgarber1@ualberta.ca> Reviewed-on: https://review.coreboot.org/c/coreboot/+/34028 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src')
-rw-r--r--src/console/vtxprintf.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/console/vtxprintf.c b/src/console/vtxprintf.c
index 01091c82e8..2d4953d013 100644
--- a/src/console/vtxprintf.c
+++ b/src/console/vtxprintf.c
@@ -38,7 +38,7 @@ static int number(void (*tx_byte)(unsigned char byte, void *data),
void *data)
{
char c, sign, tmp[66];
- const char *digits = "0123456789abcdefghijklmnopqrstuvwxyz";
+ const char *digits = "0123456789abcdef";
int i;
int count = 0;
#ifdef SUPPORT_64BIT_INTS
@@ -57,11 +57,9 @@ static int number(void (*tx_byte)(unsigned char byte, void *data),
#endif
if (type & LARGE)
- digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+ digits = "0123456789ABCDEF";
if (type & LEFT)
type &= ~ZEROPAD;
- if (base < 2 || base > 36)
- return 0;
c = (type & ZEROPAD) ? '0' : ' ';
sign = 0;
if (type & SIGN) {