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:
Gregory Nutt
2016-07-25 14:06:32 -06:00
parent 899a8aa2f0
commit e0b4a10dfa
5 changed files with 118 additions and 9 deletions
+4 -1
View File
@@ -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 **************************************/