Re: [PATCH v6 1/4] openat2: new OPENAT2_REGULAR flag support

Florian Weimer <[email protected]> Mon, 27 Apr 2026 15:27:37 +0200
Newsgroups dev.linux.lists.gfs2,dev.linux.lists.v9fs,org.kernel.vger.ceph-devel,org.kernel.vger.linux-api,org.kernel.vger.linux-cifs,org.kernel.vger.linux-fsdevel,org.kernel.vger.linux-kernel,org.kernel.vger.linux-kselftest,org.kernel.vger.linux-nfs
Message-ID <[email protected]>
* Dorjoy Chowdhury:

> diff --git a/include/uapi/asm-generic/errno.h b/include/uapi/asm-generic/errno.h
> index 92e7ae493ee3..bd78e69e0a43 100644
> --- a/include/uapi/asm-generic/errno.h
> +++ b/include/uapi/asm-generic/errno.h
> @@ -122,4 +122,6 @@
>  
>  #define EHWPOISON	133	/* Memory page has hardware error */
>  
> +#define EFTYPE		134	/* Wrong file type for the intended operation */
> +
>  #endif

This is what POSIX says about EFTYPE, in the Rationale for System
Interfaces:

“
[EFTYPE]
    This error code was proposed in earlier proposals as "Inappropriate
    operation for file type", meaning that the operation requested is
    not appropriate for the file specified in the function call. This
    code was proposed, although the same idea was covered by [ENOTTY],
    because the connotations of the name would be misleading. It was
    pointed out that the fcntl() function uses the error code [EINVAL]
    for this notion, and hence all instances of [EFTYPE] were changed to
    this code.
”

So I'm not sure if reusing this name is a good idea.

Thanks,
Florian