mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 10:33:41 +02:00
Revert "selftests: kselftest: Fix build failure with NOLIBC"
This reverts commit 16767502aa.
Nolibc gained support for uname(2) and sscanf(3) which are the
dependencies of ksft_min_kernel_version().
So re-enable support for ksft_min_kernel_version() under nolibc.
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
Acked-by: Willy Tarreau <w@1wt.eu>
Link: https://lore.kernel.org/r/20250209-nolibc-scanf-v2-2-c29dea32f1cd@weissschuh.net
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
This commit is contained in:
parent
22edf1f8d4
commit
3bd53b2fa5
|
|
@ -444,10 +444,6 @@ static inline __noreturn __printf(1, 2) void ksft_exit_skip(const char *msg, ...
|
|||
static inline int ksft_min_kernel_version(unsigned int min_major,
|
||||
unsigned int min_minor)
|
||||
{
|
||||
#ifdef NOLIBC
|
||||
ksft_print_msg("NOLIBC: Can't check kernel version: Function not implemented\n");
|
||||
return 0;
|
||||
#else
|
||||
unsigned int major, minor;
|
||||
struct utsname info;
|
||||
|
||||
|
|
@ -455,7 +451,6 @@ static inline int ksft_min_kernel_version(unsigned int min_major,
|
|||
ksft_exit_fail_msg("Can't parse kernel version\n");
|
||||
|
||||
return major > min_major || (major == min_major && minor >= min_minor);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* __KSELFTEST_H */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user