From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754629AbbFLW02 (ORCPT ); Fri, 12 Jun 2015 18:26:28 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:36159 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750753AbbFLW01 (ORCPT ); Fri, 12 Jun 2015 18:26:27 -0400 Date: Fri, 12 Jun 2015 15:26:26 -0700 From: Greg KH To: One Thousand Gnomes Cc: julien.dehee@gmail.com, abbotti@mev.co.uk, hsweeten@visionengravers.com, tapaswenipathak@gmail.com, hamohammed.sa@gmail.com, viro@zeniv.linux.org.uk, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: comedi: replace ENOSYS by proper error codes Message-ID: <20150612222626.GA10514@kroah.com> References: <1434140438-57879-1-git-send-email-julien.dehee@gmail.com> <20150612204327.GB1410@kroah.com> <20150612220616.14fdd5b7@lxorguk.ukuu.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150612220616.14fdd5b7@lxorguk.ukuu.org.uk> User-Agent: Mutt/1.5.23+89 (0255b37be491) (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 12, 2015 at 10:06:16PM +0100, One Thousand Gnomes wrote: > On Fri, 12 Jun 2015 13:43:27 -0700 > Greg KH wrote: > > > On Fri, Jun 12, 2015 at 10:20:38PM +0200, julien.dehee@gmail.com wrote: > > > From: Julien Dehee > > > > > > comedi/comedi_fops.c > > > use ENODEV following open manual > > That should probably be ENXIO by a strict reading, but Linux has always > used ENODEV 8) > > > > > > > comedi/drivers.c > > > use ENOTTY following ioctl manual > > > > > > drivers/serial2002.c > > > use ENOTTY following ioctl manual > > > > What do you mean by "ioctl manual"? > > man 2 ioctl > > Unknown ioctls on a device should error with ENOTTY. It's one of > those crazy pieces of Unix history. Note that the man 2 ioctl interface is not always what the kernel exposes, but rather, what your libc exposes to other programs. So setting these kernel values might not change what you get all the way through, have you tested it? thanks, greg k-h