public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
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
Date: Fri, 12 Jun 2015 15:26:26 -0700	[thread overview]
Message-ID: <20150612222626.GA10514@kroah.com> (raw)
In-Reply-To: <20150612220616.14fdd5b7@lxorguk.ukuu.org.uk>

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 <gregkh@linuxfoundation.org> wrote:
> 
> > On Fri, Jun 12, 2015 at 10:20:38PM +0200, julien.dehee@gmail.com wrote:
> > > From: Julien Dehee <julien.dehee@gmail.com>
> > > 
> > > 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

  reply	other threads:[~2015-06-12 22:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-12 20:20 [PATCH] staging: comedi: replace ENOSYS by proper error codes julien.dehee
2015-06-12 20:43 ` Greg KH
2015-06-12 21:06   ` One Thousand Gnomes
2015-06-12 22:26     ` Greg KH [this message]
2015-06-12 23:46       ` Greg KH
2015-06-14 13:58 ` Ian Abbott

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=20150612222626.GA10514@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=abbotti@mev.co.uk \
    --cc=devel@driverdev.osuosl.org \
    --cc=gnomes@lxorguk.ukuu.org.uk \
    --cc=hamohammed.sa@gmail.com \
    --cc=hsweeten@visionengravers.com \
    --cc=julien.dehee@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tapaswenipathak@gmail.com \
    --cc=viro@zeniv.linux.org.uk \
    /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