drivers/serial: Report correct number of bytes free in serial buffer with FIONWRITE. From Jussi Kivilinna.

This commit is contained in:
Gregory Nutt 2015-03-13 07:22:43 -06:00
parent 0a939ff218
commit 3473bb1635

View File

@ -877,7 +877,7 @@ static int uart_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
}
else
{
count = dev->xmit.size - (dev->xmit.head - dev->xmit.tail) - 1;
count = dev->xmit.size - (dev->xmit.head - dev->xmit.tail);
}
irqrestore(state);