From: Ned Bass Date: Tue, 9 Nov 2010 22:06:13 +0000 (-0800) Subject: Give ENOTSUP a valid user space error value X-Git-Tag: spl-0.5.2^0 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=00ba7ef9002a7dc7919260240f58fd8f31cea24f;p=spl 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 --- 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