Re: Broken ioctl error returns (was Re: [PATCH 2/3] block: fail SCSI passthrough ioctls on partition devices)

2012-01-06 Thread Arnd Bergmann
On Thursday 05 January 2012, Linus Torvalds wrote: And finally, ENOIOCTLCMD is a way to say ENOTTY in a sane manner, and will now be turned into ENOTTY for the user space return (not EINVAL - I have no idea where that idiocy came from, but it's clearly confused, although it's also clearly

Re: Broken ioctl error returns (was Re: [PATCH 2/3] block: fail SCSI passthrough ioctls on partition devices)

2012-01-06 Thread Linus Torvalds
On Fri, Jan 6, 2012 at 8:19 AM, Arnd Bergmann a...@arndb.de wrote: For a simpler solution, we could keep the old warning message, but change the logic from (.compat_ioctl == NULL || .compat_ioctl() == -ENOIOCTL) (no generic handler) to (.ioctl != NULL .compat_ioctl == NULL) (no

Re: Broken ioctl error returns (was Re: [PATCH 2/3] block: fail SCSI passthrough ioctls on partition devices)

2012-01-06 Thread Mauro Carvalho Chehab
On 05-01-2012 17:09, Mauro Carvalho Chehab wrote: On 05-01-2012 15:47, Linus Torvalds wrote: Can you test the patch with some media capture apps (preferably with the obvious fix for the problem that Paulo already pointed out - although that won't actually matter until some block driver

Broken ioctl error returns (was Re: [PATCH 2/3] block: fail SCSI passthrough ioctls on partition devices)

2012-01-05 Thread Linus Torvalds
On Thu, Jan 5, 2012 at 8:16 AM, Linus Torvalds torva...@linux-foundation.org wrote: Just fix the *obvious* breakage in BLKROSET. It's clearly what the code *intends* to do, it just didn't check for ENOIOCTLCMD. So it seems from quick grepping that the block layer isn't actually all that

Re: Broken ioctl error returns (was Re: [PATCH 2/3] block: fail SCSI passthrough ioctls on partition devices)

2012-01-05 Thread Paolo Bonzini
On 01/05/2012 06:02 PM, Linus Torvalds wrote: + return ret == -EINVAL || + ret == -ENOTTY || + ret == ENOIOCTLCMD; Missing minus before ENOIOCTLCMD. Paolo -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to

Re: Broken ioctl error returns (was Re: [PATCH 2/3] block: fail SCSI passthrough ioctls on partition devices)

2012-01-05 Thread Linus Torvalds
On Thu, Jan 5, 2012 at 9:02 AM, Linus Torvalds torva...@linux-foundation.org wrote: Added, linux-media and Mauro to the Cc, because I'm about to commit something like the attached patch to see if anything breaks. We may have to revert it if things get too nasty, but we should have done this

Re: Broken ioctl error returns (was Re: [PATCH 2/3] block: fail SCSI passthrough ioctls on partition devices)

2012-01-05 Thread Mauro Carvalho Chehab
On 05-01-2012 15:47, Linus Torvalds wrote: On Thu, Jan 5, 2012 at 9:37 AM, Mauro Carvalho Chehab mche...@infradead.org wrote: For the media drivers, we've already fixed it, at the V4L side: -EINVAL doesn't mean that an ioctl is not supported anymore. I think that such fix went into Kernel