mirror of
https://github.com/apache/nuttx.git
synced 2026-05-20 12:33:27 +08:00
Per Matias Edlund: I recently used the tcflush function and found that it failed with ENOTTY. The reason is that the TCFLSH case in the function uart_ioctl in the file drivers/serial/serial.c does not update the ret value." On success, the TCFLSH IOCTL logic needs to explicitly set the return value (ret) to zero.
This commit is contained in:
@@ -1339,6 +1339,7 @@ static int uart_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
}
|
||||
|
||||
leave_critical_section(flags);
|
||||
ret = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user