1 // SPDX-License-Identifier: GPL-2.0
3 #include <linux/kernel.h>
6 int vscnprintf(char *buf, size_t size, const char *fmt, va_list args)
8 int i = vsnprintf(buf, size, fmt, args);
11 return (i >= ssize) ? (ssize - 1) : i;
14 int scnprintf(char * buf, size_t size, const char * fmt, ...)
21 i = vsnprintf(buf, size, fmt, args);
24 return (i >= ssize) ? (ssize - 1) : i;
27 int scnprintf_pad(char * buf, size_t size, const char * fmt, ...)
34 i = vscnprintf(buf, size, fmt, args);
38 for (; i < (int) size; i++)
43 return (i >= ssize) ? (ssize - 1) : i;