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>
Mon, 14 Feb 2022 18:48:53 +0000 (10:48 -0800)
commit900c4836712638bf278b8474457071bcf79c9213
tree333f787ff30d7cbea8e2096d8d12c2729b37a96a
parent7f7d6ab02b49878878257b810a9f7e843ab91176
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