diff options
Diffstat (limited to 'kern/printf.c')
-rw-r--r-- | kern/printf.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/kern/printf.c b/kern/printf.c index af59d5a..ea78d48 100644 --- a/kern/printf.c +++ b/kern/printf.c @@ -615,6 +615,16 @@ vsnprintf(char *buf, size_t size, const char *fmt, va_list args) return cookie.index; } +int +snprintf(char *buf, size_t size, const char *fmt, ...) +{ + int written; + va_list listp; + va_start(listp, fmt); + written = vsnprintf(buf, size, fmt, listp); + va_end(listp); + return written; +} void safe_gets(str, maxlen) char *str; |