system/bt
Revision | de394d7a4cd3dd68edfbf6eb6c2eb89c0cbbed29 (tree) |
---|---|
Zeit | 2016-10-07 00:20:31 |
Autor | Pavlin Radoslavov <pavlin@goog...> |
Commiter | Chih-Wei Huang |
Add a missing OSI_NO_INTR() wrapper around socket read()
Also, print a better error message.
Change-Id: I22da05fd5e9b10a5122705105ea7a45855eb144d
@@ -203,10 +203,10 @@ static int bt_vendor_wait_hcidev(void) | ||
203 | 203 | } |
204 | 204 | |
205 | 205 | if (fds[0].revents & POLLIN) { |
206 | - n = read(fd, &ev, sizeof(struct mgmt_pkt)); | |
206 | + OSI_NO_INTR(n = read(fd, &ev, sizeof(struct mgmt_pkt))); | |
207 | 207 | if (n < 0) { |
208 | - LOG_ERROR(LOG_TAG, | |
209 | - "Error reading control channel"); | |
208 | + LOG_ERROR(LOG_TAG, "Error reading control channel: %s", | |
209 | + strerror(errno)); | |
210 | 210 | ret = -1; |
211 | 211 | break; |
212 | 212 | } |