tools/nolibc: add support for uname(2)
authorThomas Weißschuh <linux@weissschuh.net>
Sat, 13 Apr 2024 23:45:09 +0000 (01:45 +0200)
committerThomas Weißschuh <linux@weissschuh.net>
Sun, 14 Apr 2024 18:28:54 +0000 (20:28 +0200)
commit0adab2b6b7336fb6ee3c6456a432dad3b1d25647
tree63364137143c23cab403ad7681f7713d47e91582
parente93b912ecf6ab113c9d4ec9ced2fa30dfac24c70
tools/nolibc: add support for uname(2)

All supported kernels are assumed to use struct new_utsname.
This is validated in test_uname().

uname(2) can for example be used in ksft_min_kernel_version() from the
kernels selftest framework.

Link: https://lore.kernel.org/lkml/20240412123536.GA32444@redhat.com/
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Acked-by: Willy Tarreau <w@1wt.eu>
tools/include/nolibc/sys.h
tools/testing/selftests/nolibc/nolibc-test.c