]> Gentwo Git Trees - linux/.git/commit
tools/nolibc/stdio: let perror work when NOLIBC_IGNORE_ERRNO is set
authorBenjamin Berg <benjamin.berg@intel.com>
Wed, 24 Sep 2025 14:20:50 +0000 (16:20 +0200)
committerThomas Weißschuh <linux@weissschuh.net>
Wed, 29 Oct 2025 15:29:13 +0000 (16:29 +0100)
commitc485ca3aff2442adea4c08ceb5183e671ebed22a
treed13e10c5de10d7905880aa377a83e7079207cdd4
parent089c0a9853ae6b297adf6e2f3b94e4f75dc1f97f
tools/nolibc/stdio: let perror work when NOLIBC_IGNORE_ERRNO is set

There is no errno variable when NOLIBC_IGNORE_ERRNO is defined. As such,
simply print the message with "unknown error" rather than the integer
value of errno.

Fixes: acab7bcdb1bc ("tools/nolibc/stdio: add perror() to report the errno value")
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
tools/include/nolibc/stdio.h