From: Andreas Dilger <adilger@turbolabs.com>
To: Andrew Morton <akpm@zip.com.au>
Cc: Pavel Machek <pavel@ucw.cz>, kernel list <linux-kernel@vger.kernel.org>
Subject: Re: ENOTTY from ext3 code?
Date: Tue, 19 Feb 2002 14:20:00 -0700 [thread overview]
Message-ID: <20020219142000.H25713@lynx.adilger.int> (raw)
In-Reply-To: <20020219190932.GA274@elf.ucw.cz> <3C72BC0C.821EAB90@zip.com.au>
In-Reply-To: <3C72BC0C.821EAB90@zip.com.au>; from akpm@zip.com.au on Tue, Feb 19, 2002 at 12:56:44PM -0800
On Feb 19, 2002 12:56 -0800, Andrew Morton wrote:
> Pavel Machek wrote:
> > ext3/ioctl.c:
> >
> > ...
> > return -ENOTTY;
> >
> > Does it really make sense to return "not a typewriter" from ext3
> > ioctl?
>
> ERRORS
> ...
>
> ENOTTY The specified request does not apply to the kind of
> object that the descriptor d references.
>
> Lots and lots of ioctls return ENOTTY when passed a request
> which they don't understand. There's probably a great reason
> for this, but I can't immediately think what it might be.
Well, returning ENOTTY for unknown ioctls instead of EINVAL allows you
to distinguish between 'I have no idea what you are asking of me' and
'you passed me the incorrect parameter to this request' in the caller.
Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/
next prev parent reply other threads:[~2002-02-19 21:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-19 19:09 ENOTTY from ext3 code? Pavel Machek
2002-02-19 20:31 ` Alexander Viro
2002-02-19 20:34 ` Richard B. Johnson
2002-02-19 20:56 ` Andrew Morton
2002-02-19 21:20 ` Andreas Dilger [this message]
2002-02-19 21:26 ` Guest section DW
[not found] <mailman.1014150283.20067.linux-kernel2news@redhat.com>
2002-02-19 21:53 ` Pete Zaitcev
2002-02-20 1:23 ` Alan Cox
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=20020219142000.H25713@lynx.adilger.int \
--to=adilger@turbolabs.com \
--cc=akpm@zip.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@ucw.cz \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox