kvprintf: Pad %*c to width, like %*s

Sponsored by:	EMC / Isilon Storage Division
This commit is contained in:
Conrad Meyer 2016-06-09 18:24:51 +00:00
parent 54ab80ee61
commit dd6ea7f7bc

View File

@ -730,7 +730,15 @@ reswitch: switch (ch = (u_char)*fmt++) {
PCHAR('>');
break;
case 'c':
width -= 1;
if (!ladjust && width > 0)
while (width--)
PCHAR(padc);
PCHAR(va_arg(ap, int));
if (ladjust && width > 0)
while (width--)
PCHAR(padc);
break;
case 'D':
up = va_arg(ap, u_char *);