Skip to content
Commit 325081b9 authored by Adhemerval Zanella's avatar Adhemerval Zanella
Browse files

string: Add strerrorname_np and strerrordesc_np



The strerrorname_np returns error number name (e.g. "EINVAL" for EINVAL)
while strerrordesc_np returns string describing error number (e.g
"Invalid argument" for EINVAL).  Different than strerror,
strerrordesc_np does not attempt to translate the return description,
both functions return NULL for an invalid error number.

They should be used instead of sys_errlist and sys_nerr, both are
thread and async-signal safe.  These functions are GNU extensions.

Checked on x86-64-linux-gnu, i686-linux-gnu, powerpc64le-linux-gnu,
and s390x-linux-gnu.

Tested-by: default avatarCarlos O'Donell <carlos@redhat.com>
Reviewed-by: default avatarCarlos O'Donell <carlos@redhat.com>
parent bfe05aa2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment