From: Robert Love <rml@novell.com>
To: John McCutchan <ttb@tentacle.dhs.org>
Cc: linux-kernel@vger.kernel.org, akpm@osdl.org
Subject: [patch] inotify: ioctl retval
Date: Mon, 04 Oct 2004 18:24:12 -0400 [thread overview]
Message-ID: <1096928652.4335.1.camel@betsy.boston.ximian.com> (raw)
In-Reply-To: <1096865816.3827.1.camel@vertex>
[-- Attachment #1: Type: text/plain, Size: 225 bytes --]
John,
It is a shock--so you might want to sit down--but POSIX says that an
ioctl must return ENOTTY when a valid fd is given a cmd that is not
valid for that fd.
Even the man page confirms this.
Astonished,
Robert Love
[-- Attachment #2: inotify-0.12-rml-ioctyl-retval-1.patch --]
[-- Type: text/x-patch, Size: 489 bytes --]
A shock, but POSIX defines an invalid ioctl() cmd as returning -ENOTTY.
drivers/char/inotify.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
diff -urN linux-inotify/drivers/char/inotify.c linux/drivers/char/inotify.c
--- linux-inotify/drivers/char/inotify.c 2004-10-04 14:56:17.000000000 -0400
+++ linux/drivers/char/inotify.c 2004-10-04 18:20:50.052997768 -0400
@@ -925,7 +925,7 @@
return -EFAULT;
return 0;
default:
- return -EINVAL;
+ return -ENOTTY;
}
}
prev parent reply other threads:[~2004-10-04 22:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-04 4:56 [RFC][PATCH] inotify 0.12.0 John McCutchan
2004-10-04 18:13 ` [patch] inotify locking and other misc Robert Love
2004-10-04 22:39 ` Robert Love
2004-10-04 18:19 ` [patch] inotify: make dnotify configurable Robert Love
2004-10-04 18:23 ` [patch] inotify: make nr_watches unsigned Robert Love
2004-10-04 18:54 ` [patch] inotify: more misc stuff Robert Love
2004-10-04 18:58 ` [patch] inotify: idr layerization Robert Love
2004-10-04 22:24 ` Robert Love [this message]
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=1096928652.4335.1.camel@betsy.boston.ximian.com \
--to=rml@novell.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ttb@tentacle.dhs.org \
/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
all inboxes | Powered by JetHome®