tools/nolibc/stdio: add perror() to report the errno value
authorWilly Tarreau <w@1wt.eu>
Mon, 7 Feb 2022 16:23:35 +0000 (17:23 +0100)
committerPaul E. McKenney <paulmck@kernel.org>
Thu, 24 Feb 2022 17:56:45 +0000 (09:56 -0800)
commit642921ee0c889eab32016fe8336d6a1a1759b81a
treea31ec01d6d49fba8e4903e9710eec30c7d0029f6
parenta925e37c66779a3fe5bfa5902955fe7e907ba6f7
tools/nolibc/stdio: add perror() to report the errno value

It doesn't contain the text for the error codes, but instead displays
"errno=" followed by the errno value. Just like the regular errno, if
a non-empty message is passed, it's placed followed with ": " on the
output before the errno code. The message is emitted on stderr.

Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
tools/include/nolibc/stdio.h