summaryrefslogtreecommitdiff
path: root/tools/include
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2023-04-06 19:19:10 +0300
committerShuah Khan <skhan@linuxfoundation.org>2023-04-11 23:10:42 +0300
commit322759f98336b2c12113c3052289c5d83ff9b572 (patch)
treed3f74287d281e121f2e10542a22c4f2cccb87fe3 /tools/include
parent5874a6a187f2e814542d7fdf918fd29f79ff25c3 (diff)
downloadlinux-322759f98336b2c12113c3052289c5d83ff9b572.tar.xz
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 <w@1wt.eu> Signed-off-by: Mark Brown <broonie@kernel.org> Acked-by: Willy Tarreau <w@1wt.eu> Acked-by: Paul E. McKenney <paulmck@kernel.org> Acked-by: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/include')
-rw-r--r--tools/include/nolibc/stdio.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/include/nolibc/stdio.h b/tools/include/nolibc/stdio.h
index 96ac8afc5aee..6cbbb52836a0 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, ...)
{