]> git.proxmox.com Git - mirror_spl.git/commitdiff
Give ENOTSUP a valid user space error value
authorNed Bass <bass6@llnl.gov>
Tue, 9 Nov 2010 22:06:13 +0000 (14:06 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 10 Nov 2010 21:25:49 +0000 (13:25 -0800)
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 <behlendorf1@llnl.gov>
include/sys/sysmacros.h

index 210dfb5c598ae26076645614fe53454a04fa5ae9..35f7cb5c1edb4e2fa9a4614f86852e6adf9b3a09 100644 (file)
@@ -60,7 +60,7 @@
 #define UINT64_MIN                     ULLONG_MIN
 
 #define NBBY                           8
-#define ENOTSUP                                ENOTSUPP
+#define ENOTSUP                                EOPNOTSUPP
 
 #define MAXMSGLEN                      256
 #define MAXNAMELEN                     256