Add %p to libc's debug printf (#2062)

This commit is contained in:
Nathaniel Wesley Filardo 2017-08-16 15:38:10 -04:00 committed by Marcel Stör
parent c4440e47ba
commit fe032edd9c
1 changed files with 4 additions and 0 deletions

View File

@ -120,6 +120,10 @@ reswitch: switch (ch = *fmt++) {
va_arg(ap, uint32_t) : va_arg(ap, uint32_t);
kprintn(put, ul, 10, width, zwidth);
break;
case 'p':
ul = va_arg(ap, ptrdiff_t);
kprintn(put, ul, 16, width, zwidth);
break;
case 'x':
ul = lflag ?
va_arg(ap, uint32_t) : va_arg(ap, uint32_t);