openat2: introduce EFTYPE error code

Introduce a new error code EFTYPE for wrong file type operations.
EFTYPE is already used in BSD systems like FreeBSD and macOS.

This will be used by the upcoming OPENAT2_REGULAR flag support to
return a specific error when a path doesn't refer to a regular file.

Signed-off-by: Dorjoy Chowdhury <dorjoychy111@gmail.com>
Link: https://patch.msgid.link/20260328172314.45807-2-dorjoychy111@gmail.com
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Aleksa Sarai <aleksa@amutable.com>
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
This commit is contained in:
Dorjoy Chowdhury
2026-03-28 23:22:22 +06:00
committed by Christian Brauner
parent 09e8b7a428
commit cf1b04aaef
10 changed files with 20 additions and 0 deletions

View File

@@ -122,4 +122,6 @@
#define EHWPOISON 133 /* Memory page has hardware error */
#define EFTYPE 134 /* Wrong file type for the intended operation */
#endif