Lines Matching refs:ret
63 int ret; in rmtfs_open() local
65 ret = qmi_decode_message(&req, &txn, pkt, QMI_REQUEST, in rmtfs_open()
67 if (ret < 0) { in rmtfs_open()
95 ret = qrtr_sendto(sock, pkt->node, pkt->port, in rmtfs_open()
97 if (ret < 0) in rmtfs_open()
99 strerror(-ret)); in rmtfs_open()
110 int ret; in rmtfs_close() local
112 ret = qmi_decode_message(&req, &txn, pkt, QMI_REQUEST, in rmtfs_close()
114 if (ret < 0) { in rmtfs_close()
141 ret = qrtr_sendto(sock, pkt->node, pkt->port, in rmtfs_close()
143 if (ret < 0) in rmtfs_close()
145 strerror(-ret)); in rmtfs_close()
166 int ret; in rmtfs_iovec() local
170 ret = qmi_decode_message(&req, &txn, pkt, QMI_REQUEST, in rmtfs_iovec()
172 if (ret < 0) { in rmtfs_iovec()
239 ret = qrtr_sendto(sock, pkt->node, pkt->port, in rmtfs_iovec()
241 if (ret < 0) in rmtfs_iovec()
243 strerror(-ret)); in rmtfs_iovec()
256 int ret; in rmtfs_alloc_buf() local
258 ret = qmi_decode_message(&req, &txn, pkt, QMI_REQUEST, in rmtfs_alloc_buf()
260 if (ret < 0) { in rmtfs_alloc_buf()
288 ret = qrtr_sendto(sock, pkt->node, pkt->port, in rmtfs_alloc_buf()
290 if (ret < 0) in rmtfs_alloc_buf()
292 strerror(-ret)); in rmtfs_alloc_buf()
303 int ret; in rmtfs_get_dev_error() local
305 ret = qmi_decode_message(&req, &txn, pkt, QMI_REQUEST, in rmtfs_get_dev_error()
308 if (ret < 0) { in rmtfs_get_dev_error()
334 ret = qrtr_sendto(sock, pkt->node, pkt->port, in rmtfs_get_dev_error()
336 if (ret < 0) in rmtfs_get_dev_error()
338 strerror(-ret)); in rmtfs_get_dev_error()
362 int ret; in handle_rmtfs() local
365 ret = recvfrom(sock, buf, sizeof(buf), 0, (void *)&sq, &sl); in handle_rmtfs()
366 if (ret < 0) { in handle_rmtfs()
367 ret = -errno; in handle_rmtfs()
368 if (ret != -ENETRESET) in handle_rmtfs()
369 fprintf(stderr, "[RMTFS] recvfrom failed: %d\n", ret); in handle_rmtfs()
370 return ret; in handle_rmtfs()
375 ret = qrtr_decode(&pkt, buf, ret, &sq); in handle_rmtfs()
376 if (ret < 0) { in handle_rmtfs()
378 return ret; in handle_rmtfs()
387 ret = qmi_decode_header(&pkt, &msg_id); in handle_rmtfs()
388 if (ret < 0) in handle_rmtfs()
389 return ret; in handle_rmtfs()
415 return ret; in handle_rmtfs()
427 int ret; in run_rmtfs() local
437 ret = qrtr_publish(rmtfs_fd, RMTFS_QMI_SERVICE, in run_rmtfs()
439 if (ret < 0) { in run_rmtfs()
441 return ret; in run_rmtfs()
461 ret = select(nfds, &rfds, NULL, NULL, NULL); in run_rmtfs()
462 if (ret < 0 && errno != EINTR) in run_rmtfs()
464 else if (ret < 0 && errno == EINTR) in run_rmtfs()
468 ret = read(rprocfd, &done, 1); in run_rmtfs()
469 if (!ret || done == 'Y') in run_rmtfs()
474 ret = handle_rmtfs(rmtfs_fd); in run_rmtfs()
475 if (ret == -ENETRESET) in run_rmtfs()
482 return ret; in run_rmtfs()
496 int ret; in main() local
553 ret = storage_init(storage_root, read_only, use_partitions); in main()
554 if (ret) { in main()
560 ret = run_rmtfs(rprocfd); in main()
561 } while (ret == -ENETRESET); in main()