Commit a0474b8d authored by zhang jiao's avatar zhang jiao Committed by Shuah Khan

selftests: kselftest: Use strerror() on nolibc

Nolibc gained an implementation of strerror() recently.
Use it and drop the ifndef.
Signed-off-by: default avatarzhang jiao <zhangjiao2@cmss.chinamobile.com>
Acked-by: default avatarThomas Weißschuh <linux@weissschuh.net>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent af1ec38c
......@@ -373,15 +373,7 @@ static inline __noreturn __printf(1, 2) void ksft_exit_fail_msg(const char *msg,
static inline __noreturn void ksft_exit_fail_perror(const char *msg)
{
#ifndef NOLIBC
ksft_exit_fail_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_exit_fail_msg("%s: %d)\n", msg, errno);
#endif
}
static inline __noreturn void ksft_exit_xfail(void)
......
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