Re: [RESEND] [PATCH] remove TCGETS
"Yang, Chen" <[email protected]> Wed, 4 Feb 2004 00:11:28 +0800
| Newsgroups | gmane.comp.file-systems.intermezzo.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, Matthew:
Thank you for your message.
I had merged the patch with other patches and sent to Linus in
October. But unfortunately, Linus rejected the patch. I don't know what the
reason was. Linus announced that he would accept real patches sometime
before I sent the patch.
From the mail that Linus posted in this list on Oct, 29(attached below)
, he mentioned we should use ENOTTY other than EINVAL.
So The patch should be:
diff -urpNX dontdiff linus-2.6/fs/intermezzo/dir.c
parisc-2.6/fs/intermezzo/dir.c
--- linus-2.6/fs/intermezzo/dir.c Sun Feb 1 14:15:44 2004
+++ parisc-2.6/fs/intermezzo/dir.c Tue Jan 27 11:20:24 2004
@@ -1305,10 +1305,6 @@ int presto_ioctl(struct inode *inode, st
return rc;
}
- case TCGETS:
- EXIT;
- return -EINVAL;
-
default:
EXIT;
return -ENOTTY;
I will re-send the patch to Linus with the old patch.
----
Yang, Chen
Linus's mail:
On Tue, 28 Oct 2003, David Woodhouse wrote:
>
> Linus; executive decision required please:
I don't know you you _require_ an executive decision, but the simple fact
is that the regular Linux ioctl() handler always returns ENOTTY if it
doesn't match a ioctl number. See fs/ioctl.c.
In short, the way I think this should be handled is:
- if you don't recognize the ioctl, you should return ENOTTY
- if you recognize the ioctl, but some parameter to the ioctl is wrong,
you should return EINVAL.
This is consistent with file_ioctl(), and also consistent with traditional
uses of ENOTTY. It also just happens to make LTP pass, but I will leave to
you to make up your own mind on whether that is because LTP is a good
test, or whether it's just a small unimportant detail.
Linus
----- Original Message -----
From: "Matthew Wilcox" <[email protected]>
To: <[email protected]>
Sent: Monday, February 02, 2004 10:28 AM
Subject: [RESEND] [PATCH] remove TCGETS
>
> This patch has also been overlooked for several months.
>
> diff -urpNX dontdiff linus-2.6/fs/intermezzo/dir.c
parisc-2.6/fs/intermezzo/dir.c
> --- linus-2.6/fs/intermezzo/dir.c Sun Feb 1 14:15:44 2004
> +++ parisc-2.6/fs/intermezzo/dir.c Tue Jan 27 11:20:24 2004
> @@ -1305,10 +1305,6 @@ int presto_ioctl(struct inode *inode, st
> return rc;
> }
>
> - case TCGETS:
> - EXIT;
> - return -EINVAL;
> -
> default:
> EXIT;
> return -EINVAL;
>
> --
> "Next the statesmen will invent cheap lies, putting the blame upon
> the nation that is attacked, and every man will be glad of those
> conscience-soothing falsities, and will diligently study them, and refuse
> to examine any refutations of them; and thus he will by and by convince
> himself that the war is just, and will thank God for the better sleep
> he enjoys after this process of grotesque self-deception." -- Mark Twain
>
>
> -------------------------------------------------------
> The SF.Net email is sponsored by EclipseCon 2004
> Premiere Conference on Open Tools Development and Integration
> See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
> http://www.eclipsecon.org/osdn
> _______________________________________________
> intermezzo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/intermezzo-devel
>
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn