Lines Matching refs:ret
89 int ret; in rwrite() local
92 ret = write(fd, buf, len); in rwrite()
93 } while (ret < 0 && errno == EINTR); in rwrite()
95 if (ret != len) { in rwrite()
104 int ret; in rread() local
107 ret = read(fd, buf, len); in rread()
108 } while (ret < 0 && errno == EINTR); in rread()
110 return ret; in rread()
134 int ret = read(pfd.fd, buf, sizeof(buf)); in discard_inotify_evt() local
135 ALOGD("Discarded %d bytes of inotify data", ret); in discard_inotify_evt()
144 int ret = TEMP_FAILURE_RETRY(poll(&pfd, 1, 5000)); in wait_on_dev_lock() local
145 if (ret < 0) { in wait_on_dev_lock()
148 } else if (ret > 0) { in wait_on_dev_lock()
240 int ret = TEMP_FAILURE_RETRY(poll(myFds, numPollFds, -1)); in runDeviceRx() local
241 if (ret == 0) in runDeviceRx()
243 else if (ret < 0) { in runDeviceRx()
256 ret = rread(mFd, &msg, sizeof(msg)); in runDeviceRx()
257 if (ret <= 0) { in runDeviceRx()
258 ALOGE("read failed with %d", ret); in runDeviceRx()
261 if (ret < (int)sizeof(msg.raw.hdr)) { in runDeviceRx()
262 ALOGE("Only read %d bytes", ret); in runDeviceRx()
274 if (ret == (int)(sizeof(msg.raw.hdr) + len)) { in runDeviceRx()
275 ret = SystemComm::handleRx(&msg.raw); in runDeviceRx()
276 if (ret > 0) { in runDeviceRx()
284 } else if (ret == (int)(sizeof(msg.chre.hdr) + len)) { in runDeviceRx()
285 ret = SystemComm::handleRx(&msg.chre); in runDeviceRx()
286 if (ret > 0) { in runDeviceRx()
294 …ected (%zu|%zu) bytes, read %d bytes", sizeof(msg.raw.hdr) + len, sizeof(msg.chre.hdr) + len, ret); in runDeviceRx()
298 if (ret < 0) in runDeviceRx()
299 ALOGE("SystemComm::handleRx() returned %d", ret); in runDeviceRx()
314 int ret = 0; in openHub() local
319 ret = -errno; in openHub()
325 ret = -errno; in openHub()
337 return ret; in openHub()
383 int ret = 0; in doSubscribeMessages() local
395 ret = closeHub(); in doSubscribeMessages()
399 ret = openHub(); in doSubscribeMessages()
405 return ret; in doSubscribeMessages()
414 int ret = 0; in doSendToNanohub() local
419 ret = -EIO; in doSendToNanohub()
423 ret = -EINVAL; in doSendToNanohub()
429 ret = SystemComm::handleTx(msg, transaction_id); in doSendToNanohub()
432 ret = -EINVAL; in doSendToNanohub()
437 … ret = doSendToDevice(msg->app_name, msg->message, msg->message_len, msg->message_type, endpoint); in doSendToNanohub()
441 return ret; in doSendToNanohub()