From: Clemens Ladisch <clemens@ladisch.de>
To: Masahiro Yamada <yamada.masahiro@socionext.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [Question] Usage of ENOTSUPP error code
Date: Mon, 06 Jul 2015 09:37:02 +0200 [thread overview]
Message-ID: <559A301E.5000201@ladisch.de> (raw)
In-Reply-To: <CAK7LNAR2g2Edm-CMxLaRLs4hHM_4-FWkKFwRjmPgnuVSTTXU0g@mail.gmail.com>
Masahiro Yamada wrote:
> I noticed many drivers return -ENOTSUPP on error.
>
> I assume ENOTSUPP is defined in include/linux/errno.h
> as follows:
>
> /* Defined for the NFSv3 protocol */
> ...
> #define ENOTSUPP 524 /* Operation is not supported */
>
> If so, should ENOTSUPP be only used for NFS-related errors?
There is typcially no such restriction.
However, the problem with ENOTSUPP is that it is not defined in
the uapi header, so it will not be known to user space programs.
> In fact, ENOTSUPP is used by various drivers
> including non-network ones such as pinctrl, USB, etc.
If it is possible that the error code shows up for user space, ENOTSUPP
should not be used. Alternatives would be something like ENOTSUP,
EOPNOTSUPP, ENOIOCTLCMD, ENOSYS, or EINVAL.
Regards,
Clemens
next prev parent reply other threads:[~2015-07-06 7:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-03 10:17 [Question] Usage of ENOTSUPP error code Masahiro Yamada
2015-07-06 7:37 ` Clemens Ladisch [this message]
2015-07-06 16:25 ` Masahiro Yamada
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=559A301E.5000201@ladisch.de \
--to=clemens@ladisch.de \
--cc=linux-kernel@vger.kernel.org \
--cc=yamada.masahiro@socionext.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.