]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 12:54:50 +0000 (13:54 +0100)
commit5bfe033a1b775585b41aba408299ab7f7a857bfc
treed316a2bfa6fc5fbeea9c9a7c50036d6d07b60e90
parentd6bec89235d736f3919ff9365e852ff3b20f2198
tools/nolibc/stdio: let perror work when NOLIBC_IGNORE_ERRNO is set

[ Upstream commit c485ca3aff2442adea4c08ceb5183e671ebed22a ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/include/nolibc/stdio.h