[PATCH 2/5] manual: Document error codes missing for 'if_indextoname'
Maciej W. Rozycki
macro@redhat.com
Tue May 27 13:45:50 GMT 2025
On Mon, 26 May 2025, Florian Weimer wrote:
> > +@item ENOSYS
> > +This function is not implemented.
> > +@end table
>
> I think ENOSYS comes from the unused stub, so we don't need to document
> it. The Hurd implementation has an error path for ENOSYS, but that
> looks effectively dead (it requires a race condition on the socket
> descriptor).
Is it this code sequence:
if (__ioctl (fd, SIOCGIFNAME, &ifr) < 0)
{
int saved_errno = errno;
__close (fd);
if (saved_errno == EINVAL || saved_errno == ENOTTY)
__hurd_fail (ENOSYS);
that you refer to? If so, then it seems like an implementation bug to me,
as POSIX has it:
[ENOSYS]
Functionality not supported. An attempt was made to use optional
functionality that is not supported in this implementation.
which does not seem adequate for reporting a request failure coming from a
race condition.
Maciej
More information about the Libc-alpha
mailing list