Bluetooth HAL: Fail loudly on a write failure
Bug: 205758693
Test: VtsHalBluetoothTargetTest
Change-Id: I2151b324247a83a454b81c28c9f0f5cd5581be09
diff --git a/bluetooth/hci/h4_protocol.cc b/bluetooth/hci/h4_protocol.cc
index 97ba7aa..51a624f 100644
--- a/bluetooth/hci/h4_protocol.cc
+++ b/bluetooth/hci/h4_protocol.cc
@@ -58,10 +58,8 @@
while (1) {
ret = TEMP_FAILURE_RETRY(writev(uart_fd_, iov, 2));
if (ret == -1) {
- if (errno == EAGAIN) {
- ALOGE("%s error writing to UART (%s)", __func__, strerror(errno));
- continue;
- }
+ LOG_ALWAYS_FATAL("%s error writing to UART (%s)", __func__,
+ strerror(errno));
} else if (ret == 0) {
// Nothing written :(
ALOGE("%s zero bytes written - something went wrong...", __func__);