Skip to content

Commit

Permalink
tools/nolibc/stdio: Implement vprintf()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Brown authored and Shuah Khan committed Apr 11, 2023
1 parent 5874a6a commit 322759f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/include/nolibc/stdio.h
Original file line number Diff line number Diff line change
Expand Up @@ -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, ...)
{
Expand Down

0 comments on commit 322759f

Please sign in to comment.