This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: strerror for 524
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: Jeffrey Walton <noloader at gmail dot com>
- Cc: libc-help <libc-help at sourceware dot org>
- Date: Sat, 30 Nov 2019 15:41:17 +0100
- Subject: Re: strerror for 524
- References: <CAH8yC8=oZo-USygHFqSv8wXCV=Yp+mrmDV+T7WtLmLwt0U2KtQ@mail.gmail.com>
* Jeffrey Walton:
> I was testing the code at
> https://www.kernel.org/doc/html/latest/networking/tls.html#kernel-tls.
> The code returns error 524 for setsockopt. Calling strerror(errno)
> results in "Unknown error 524".
>
> Error code 524 seems to be pretty prevalent. [0,1,2,3]] (and friends)
>
> I think the error string for code 524 could be improved. There is a
> small list of similar error codes at
> https://bugzilla.redhat.com/show_bug.cgi?id=1778348#c1 .
>
> Would glibc mind providing a useful error string.
The error code is not listed in a UAPI header. Isn't it a kernel bug
that it leaks to userspace?
The internal kernel name for 524 appears to be ENOTSUPP, but the UAPI
headers currently define ENOTSUPP as EOPNOTSUPP, which is 95. If the
intent is to expose the error code to user space, that would have to
be changed, too.