From 0a89625f55ac3b220b89fe7f122e98ef49af925b Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Wed, 2 Apr 2008 12:35:45 +0000 Subject: Add missing snprintf() to libc/printf.c (trivial). This is also taken from the HelenOS project. Signed-off-by: Uwe Hermann Acked-by: Uwe Hermann git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3210 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- payloads/libpayload/libc/printf.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'payloads/libpayload/libc') diff --git a/payloads/libpayload/libc/printf.c b/payloads/libpayload/libc/printf.c index 71c7654dbb..062879c523 100644 --- a/payloads/libpayload/libc/printf.c +++ b/payloads/libpayload/libc/printf.c @@ -694,6 +694,18 @@ out: return counter; } +int snprintf(char *str, size_t size, const char *fmt, ...) +{ + int ret; + va_list args; + + va_start(args, fmt); + ret = vsnprintf(str, size, fmt, args); + va_end(args); + + return ret; +} + int sprintf(char *str, const char *fmt, ...) { int ret; -- cgit v1.2.3