Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1164445 > unrolled thread

Re: [PATCH] staging: comedi: replace ENOSYS by proper error codes

Started byGreg KH <gregkh@linuxfoundation.org>
First post2015-06-13 01:50 +0200
Last post2015-06-13 01:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] staging: comedi: replace ENOSYS by proper error codes Greg KH <gregkh@linuxfoundation.org> - 2015-06-13 01:50 +0200

#1164445 — Re: [PATCH] staging: comedi: replace ENOSYS by proper error codes

FromGreg KH <gregkh@linuxfoundation.org>
Date2015-06-13 01:50 +0200
SubjectRe: [PATCH] staging: comedi: replace ENOSYS by proper error codes
Message-ID<pAGRY-44S-19@gated-at.bofh.it>
On Fri, Jun 12, 2015 at 03:26:26PM -0700, Greg KH wrote:
> 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?

We also have the issue of the existing userspace comedi code, I don't
know if it's handling the ioctl errors differently than ioctl(2) says,
but that should be checked as well before I can take this patch.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web