mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 07:04:28 +00:00
tiny-printf: Correct the snprintf() implementation
This current code passes the variable arguments list to sprintf(). This is
not correct. Fix it by calling _vprintf() directly.
This makes firefly-rk3288 boot again.
Fixes: abeb272
("tiny-printf: Support snprintf()")
Reviewed-by: Stefan Roese <sr@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
9c2f9b2da6
commit
3191d84080
1 changed files with 3 additions and 1 deletions
|
@ -168,8 +168,10 @@ int snprintf(char *buf, size_t size, const char *fmt, ...)
|
|||
int ret;
|
||||
|
||||
va_start(va, fmt);
|
||||
ret = sprintf(buf, fmt, va);
|
||||
outstr = buf;
|
||||
ret = _vprintf(fmt, va, putc_outstr);
|
||||
va_end(va);
|
||||
*outstr = '\0';
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue