serial: nuttx: revert tcdrain back to fsync (#25538)

* serial: nuttx: revert tcdrain back to fsync

* serial: do not print error on EAGAIN

---------

Co-authored-by: Alexander Lerach <alexander@auterion.com>
This commit is contained in:
Jacob Dahl
2025-09-11 12:32:34 -08:00
committed by GitHub
co-authored by Alexander Lerach
parent 7b68c5dbfc
commit 1aad8b6ec9
3 changed files with 13 additions and 7 deletions
+3 -2
View File
@@ -268,8 +268,9 @@ ssize_t SerialImpl::write(const void *buffer, size_t buffer_size)
int ret_write = qurt_uart_write(_serial_fd, (const char *) buffer, buffer_size);
if (ret_write < 0) {
PX4_ERR("%s write error %d", _port, ret_write);
if (errno != EAGAIN) {
PX4_ERR("%s write error %d", _port, ret_write);
}
}
return ret_write;