From: Mark Brown Date: Thu, 6 Apr 2023 16:19:10 +0000 (+0100) Subject: tools/nolibc/stdio: Implement vprintf() X-Git-Tag: v6.6.7~3066^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=322759f98336b2c12113c3052289c5d83ff9b572;p=platform%2Fkernel%2Flinux-starfive.git tools/nolibc/stdio: Implement vprintf() vprintf() is equivalent to vfprintf() to stdout so implement it as a simple wrapper for the existing vfprintf(), allowing us to build kselftest.h. Suggested-by: Willy Tarreau Signed-off-by: Mark Brown Acked-by: Willy Tarreau Acked-by: Paul E. McKenney Acked-by: Shuah Khan Signed-off-by: Shuah Khan --- diff --git a/tools/include/nolibc/stdio.h b/tools/include/nolibc/stdio.h index 96ac8af..6cbbb52 100644 --- a/tools/include/nolibc/stdio.h +++ b/tools/include/nolibc/stdio.h @@ -273,6 +273,12 @@ int vfprintf(FILE *stream, const char *fmt, va_list args) return written; } +static __attribute__((unused)) +int vprintf(const char *fmt, va_list args) +{ + return vfprintf(stdout, fmt, args); +} + static __attribute__((unused, format(printf, 2, 3))) int fprintf(FILE *stream, const char *fmt, ...) {