mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
drivers/serial/pty.c, serial.c, usbdev/cdcacm.c, include/nuttx/fs/ioctl.h: Fix FIONWRITE and add FIONSPACE. All implementations of FIONWRITE were wrong. FIONWRITE should return the number of bytes waiting in the outgoing send queue, not the free space. Rather, FIONSPACE should return the free space in the send queue.
This commit is contained in:
@@ -137,7 +137,10 @@
|
||||
* OUT: Bytes readable from this fd
|
||||
*/
|
||||
#define FIONWRITE _FIOC(0x0006) /* IN: Location to return value (int *)
|
||||
* OUT: Bytes writable to this fd
|
||||
* OUT: Number bytes in send queue
|
||||
*/
|
||||
#define FIONSPACE _FIOC(0x0007) /* IN: Location to return value (int *)
|
||||
* OUT: Free space in send queue.
|
||||
*/
|
||||
|
||||
/* NuttX file system ioctl definitions **************************************/
|
||||
|
||||
Reference in New Issue
Block a user