From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Sharp Subject: Re: [PATCH] remove TCGETS Date: Tue, 28 Oct 2003 15:51:47 -0800 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <20031028235147.GA29213@ccpu.com> References: <1067356596.15551.448.camel@hades.cambridge.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: David Woodhouse , Bryan Henderson , Matthew Wilcox , Peter Braam , intermezzo-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org Return-path: Received: from covad-netfall.meer.net ([209.157.145.14]:16604 "EHLO eviltwins") by vger.kernel.org with ESMTP id S261797AbTJ1XwN (ORCPT ); Tue, 28 Oct 2003 18:52:13 -0500 To: Linus Torvalds Content-Disposition: inline In-Reply-To: List-Id: linux-fsdevel.vger.kernel.org On Tue, Oct 28, 2003 at 01:07:53PM -0800, Linus Torvalds wrote: > > 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. Can't we add the range of tty ioctls to file_ioctl so that it can return ENOTTY so each and every file system driver doesn't have to? a