mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-06 19:32:50 -05:00
selftests: kselftest: also use strerror() on nolibc
nolibc gained an implementation of strerror() recently. Use it and drop the ifdeffery. Acked-by: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
This commit is contained in:
@@ -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, ...)
|
||||
|
||||
Reference in New Issue
Block a user