Commit 6ca8f2e2 authored by Thomas Weißschuh's avatar Thomas Weißschuh

selftests: kselftest: also use strerror() on nolibc

nolibc gained an implementation of strerror() recently.
Use it and drop the ifdeffery.
Acked-by: default avatarShuah Khan <skhan@linuxfoundation.org>
Signed-off-by: default avatarThomas Weißschuh <linux@weissschuh.net>
parent d20d0b10
......@@ -168,15 +168,7 @@ static inline __printf(1, 2) void ksft_print_msg(const char *msg, ...)
static inline void ksft_perror(const char *msg)
{
#ifndef NOLIBC
ksft_print_msg("%s: %s (%d)\n", msg, strerror(errno), errno);
#else
/*
* nolibc doesn't provide strerror() and it seems
* inappropriate to add one, just print the errno.
*/
ksft_print_msg("%s: %d)\n", msg, errno);
#endif
}
static inline __printf(1, 2) void ksft_test_result_pass(const char *msg, ...)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment