bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] fchmodat, lchmod: port to buggy Linux filesystems


From: Bruno Haible
Subject: Re: [PATCH] fchmodat, lchmod: port to buggy Linux filesystems
Date: Sun, 23 Feb 2020 02:35:44 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-171-generic; KDE/5.18.0; x86_64; ; )

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

[Prev in Thread] Current Thread [Next in Thread]