From 00ba7ef9002a7dc7919260240f58fd8f31cea24f Mon Sep 17 00:00:00 2001 From: Ned Bass Date: Tue, 9 Nov 2010 14:06:13 -0800 Subject: [PATCH] Give ENOTSUP a valid user space error value The ZFS module returns ENOTSUP for several error conditions where an operation is not (yet) supported. The SPL defined ENOTSUP in terms of ENOTSUPP, but that is an internal Linux kernel error code that should not be seen by user programs. As a result the zfs utilities print a confusing error message if an unsupported operation is attempted: internal error: Unknown error 524 Aborted This change defines ENOTSUP in terms of EOPNOTSUPP which is consistent with user space. Signed-off-by: Brian Behlendorf --- include/sys/sysmacros.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 210dfb5..35f7cb5 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -60,7 +60,7 @@ #define UINT64_MIN ULLONG_MIN #define NBBY 8 -#define ENOTSUP ENOTSUPP +#define ENOTSUP EOPNOTSUPP #define MAXMSGLEN 256 #define MAXNAMELEN 256 -- 2.39.2