From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Dilger Subject: Re: [PATCH] remove TCGETS Date: Wed, 13 Aug 2003 09:35:21 -0600 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <20030813093521.F3708@schatzie.adilger.int> References: <20030812214802.GM10015@parcelfarce.linux.theplanet.co.uk> <20030812155956.C3708@schatzie.adilger.int> <1060776724.2226.49.camel@passion.cambridge.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Matthew Wilcox , intermezzo-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org Return-path: Received: from h68-147-142-75.cg.shawcable.net ([68.147.142.75]:56050 "EHLO schatzie.adilger.int") by vger.kernel.org with ESMTP id S275251AbTHMPhb (ORCPT ); Wed, 13 Aug 2003 11:37:31 -0400 To: David Woodhouse Content-Disposition: inline In-Reply-To: <1060776724.2226.49.camel@passion.cambridge.redhat.com>; from dwmw2@infradead.org on Wed, Aug 13, 2003 at 01:12:04PM +0100 List-Id: linux-fsdevel.vger.kernel.org On Aug 13, 2003 13:12 +0100, David Woodhouse wrote: > On Tue, 2003-08-12 at 22:59, Andreas Dilger wrote: > > On Aug 12, 2003 22:48 +0100, Matthew Wilcox wrote: > > > I see no reason to handle TCGETS in presto_ioctl, and even if you do get > > > it somehow, the action is the same as the default. This happens to break > > > on PA-RISC and not on i386 due to i386 using an old-style definition of > > > TCGETS and PA-RISC using one which invovles sizeof(). > > > > > > diff -urpNX dontdiff linus-2.6/fs/intermezzo/dir.c parisc-2.6/fs/intermezzo/dir.c > > > --- linus-2.6/fs/intermezzo/dir.c Tue Aug 12 13:11:17 2003 > > > +++ parisc-2.6/fs/intermezzo/dir.c Tue Aug 12 13:29:43 2003 > > > @@ -1304,10 +1304,6 @@ int presto_ioctl(struct inode *inode, st > > > return rc; > > > } > > > > > > - case TCGETS: > > > - EXIT; > > > - return -EINVAL; > > > - > > > default: > > > EXIT; > > > return -EINVAL; > > > > I can tell you why this was originally in there - because the "default" case > > used to print out an error message for unhandled ioctls. Perl used to call > > TCGETS all the time on files in lustre, so we put in the no-op case to shut > > up the error messages. Now that the error messages are gone from the default > > case there is no need to have this there anymore, so removing it is fine. > > Why was it returning -EINVAL instead of -ENOTTY? An oversight. Returning -ENOTTY is what I would do today. Cheers, Andreas -- Andreas Dilger http://sourceforge.net/projects/ext2resize/ http://www-mddsp.enel.ucalgary.ca/People/adilger/