On Mon, Mar 13, 2023 at 05:07:59PM +0200, Jarkko Sonninen wrote:
On 3/13/23 09:53, Greg Kroah-Hartman wrote:What other tty ioctls?
On Mon, Mar 13, 2023 at 09:49:26AM +0200, Jarkko Sonninen wrote:Using ENOTTY breaks all other tty ioctls.
ENOTTY is the correct one for when an ioctl is not handled by the ioctlWhat is the correct ioctl error return value ?+{Wrong ioctl return value :(
+ void __user *argp = (void __user *)arg;
+
+ switch (cmd) {
+ case TIOCGRS485:
+ return xr_get_rs485_config(tty, argp);
+ case TIOCSRS485:
+ return xr_set_rs485_config(tty, argp);
+ }
+ return -ENOIOCTLCMD;
ENOIOCTLCMD was used in most places in usb serial as an error return.
call.
thanks,
greg k-h
confused,
greg k-h