diff options
author | Warner Losh <imp@FreeBSD.org> | 2016-05-17 21:23:13 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2016-05-17 21:23:13 +0000 |
commit | da019dfdd5021091e13590a7cf423d64691cc536 (patch) | |
tree | 3780ffe19d480710fe46c8084df38a1df35a6b6c /lib | |
parent | a54e0911c449a41b9ac5faf43b56f1632a8f6e91 (diff) | |
download | src-da019dfdd5021091e13590a7cf423d64691cc536.tar.gz src-da019dfdd5021091e13590a7cf423d64691cc536.zip |
Add support for %S to libstand as well so /boot/loader and friends can
use it.
Notes
Notes:
svn path=/head/; revision=300078
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libstand/printf.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libstand/printf.c b/lib/libstand/printf.c index fef534165616..71e313cc55ad 100644 --- a/lib/libstand/printf.c +++ b/lib/libstand/printf.c @@ -204,6 +204,7 @@ kvprintf(char const *fmt, kvprintf_fn_t *func, void *arg, int radix, va_list ap) char nbuf[MAXNBUF]; char *d; const char *p, *percent, *q; + uint16_t *S; u_char *up; int ch, n; uintmax_t num; @@ -398,6 +399,10 @@ reswitch: switch (ch = (u_char)*fmt++) { while (width--) PCHAR(padc); break; + case 'S': /* Assume console can cope with wide chars */ + for (S = va_arg(ap, uint16_t *); *S != 0; S++) + PCHAR(*S); + break; case 't': tflag = 1; goto reswitch; |