Re: [Mutt] #2975: [PATCH] Allow attachment saving on the FreeBSD's
#2975: [PATCH] Allow attachment saving on the FreeBSD's msdosfs
Comment (by rea):
Replying to [comment:1 pdmef]:
> My <sys/errno.h> (OS X) conditionally defines EOPNOTSUPP as ENOTSUP and
comments on EOPNOTSUPP as being socket-related. Therefore, I think using
ENOTSUP should be used (they're identical on FreeBSD too).
The problem is that msdosfs's code has the following stub for the 'link'
vnop:
-----
/*
* DOS filesystems don't know what links are.
*/
static int
msdosfs_link(ap)
struct vop_link_args /* {
struct vnode *a_tdvp;
struct vnode *a_vp;
struct componentname *a_cnp;
} */ *ap;
{
return (EOPNOTSUPP);
}
-----
And yes, not EOPNOTSUPP and ENOTSUP are identical in FreeBSD, so either
would work.
I am tempted to add a check for both of them: ENOTSUP semantically closer
to the meaning of the error, but there can be systems that have ENOTSUP !=
EOPNOTSUPP, but returning EOPNOTSUPP like FreeBSD does.
There is a discuission about two codes:
http://www.ussg.iu.edu/hypermail/linux/kernel/0208.0/0121.html
http://sourceware.org/ml/libc-hacker/1999-01/msg00313.html
And it seems to me that the check for both of them will not harm anything.
--
Ticket URL: <http://dev.mutt.org/trac/ticket/2975#comment:2>