Hi Paul,

> +  if (S_ISLNK (st.st_mode))
> +    {
> +      close (fd);
> +      errno = EOPNOTSUPP;
> +      return -1;
> +    }

Why EOPNOTSUPP? Why not ENOTSUP?

On Solaris, gnulib's lchmod on a symbolic link produces
  lchmod: Operation not supported on transport endpoint
"transport endpoint" is misleading.

Likewise, in POSIX [1] EOPNOTSUPP means "Operation not supported on socket".

I would find ENOTSUP a better choice.

Bruno

[1] https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/errno.h.html


Reply via email to