Lines Matching refs:ret
266 ssize_t ret; in send_log_msg() local
281 ret = TEMP_FAILURE_RETRY(write(sock, buf, len)); in send_log_msg()
282 if (ret <= 0) { in send_log_msg()
288 while ((ret = TEMP_FAILURE_RETRY(read(sock, cp, len))) > 0) { in send_log_msg()
291 if (((size_t)ret == len) || (buf_size < PAGE_SIZE)) { in send_log_msg()
295 len -= ret; in send_log_msg()
296 cp += ret; in send_log_msg()
303 ret = TEMP_FAILURE_RETRY(poll(&p, 1, 20)); in send_log_msg()
305 if (ret <= 0) { in send_log_msg()
310 ret = 0; in send_log_msg()
315 if (ret >= 0) { in send_log_msg()
316 ret += buf_size - len; in send_log_msg()
320 if ((ret == -1) && errno) { in send_log_msg()
327 return ret; in send_log_msg()
330 static int check_log_success(char *buf, ssize_t ret) in check_log_success() argument
332 if (ret < 0) { in check_log_success()
333 return ret; in check_log_success()
359 ssize_t ret = send_log_msg(logger, "getLogSize %d", buf, sizeof(buf)); in logdGetSize() local
360 if (ret < 0) { in logdGetSize()
361 return ret; in logdGetSize()
393 ssize_t ret = send_log_msg(logger, "getLogSizeUsed %d", buf, sizeof(buf)); in logdGetReadableSize() local
394 if (ret < 0) { in logdGetReadableSize()
395 return ret; in logdGetReadableSize()
486 int e, ret, remaining; in logdOpen() local
524 ret = snprintf(cp, remaining, "%c%u", c, logger->logId); in logdOpen()
525 ret = min(ret, remaining); in logdOpen()
526 remaining -= ret; in logdOpen()
527 cp += ret; in logdOpen()
532 ret = snprintf(cp, remaining, " tail=%u", logger_list->tail); in logdOpen()
533 ret = min(ret, remaining); in logdOpen()
534 remaining -= ret; in logdOpen()
535 cp += ret; in logdOpen()
541 ret = snprintf(cp, remaining, " timeout=%u", in logdOpen()
543 ret = min(ret, remaining); in logdOpen()
544 remaining -= ret; in logdOpen()
545 cp += ret; in logdOpen()
547 ret = snprintf(cp, remaining, " start=%" PRIu32 ".%09" PRIu32, in logdOpen()
550 ret = min(ret, remaining); in logdOpen()
551 remaining -= ret; in logdOpen()
552 cp += ret; in logdOpen()
556 ret = snprintf(cp, remaining, " pid=%u", logger_list->pid); in logdOpen()
557 ret = min(ret, remaining); in logdOpen()
558 cp += ret; in logdOpen()
570 ret = write(sock, buffer, cp - buffer); in logdOpen()
580 if (ret <= 0) { in logdOpen()
582 if ((ret == -1) && e) { in logdOpen()
585 if (ret == 0) { in logdOpen()
588 return ret; in logdOpen()
599 int ret, e; in logdRead() local
604 ret = logdOpen(logger_list, transp); in logdRead()
605 if (ret < 0) { in logdRead()
606 return ret; in logdRead()
621 ret = recv(ret, log_msg, LOGGER_ENTRY_MAX_LEN, 0); in logdRead()
625 if ((ret == 0) || (e == EINTR)) { in logdRead()
627 ret = -1; in logdRead()
633 if ((ret == -1) && e) { in logdRead()
636 return ret; in logdRead()
644 int ret = logdOpen(logger_list, transp); in logdPoll() local
645 if (ret < 0) { in logdPoll()
646 return ret; in logdPoll()
650 p.fd = ret; in logdPoll()
652 ret = poll(&p, 1, 20); in logdPoll()
653 if ((ret > 0) && !(p.revents & POLLIN)) { in logdPoll()
654 ret = 0; in logdPoll()
656 if ((ret == -1) && errno) { in logdPoll()
659 return ret; in logdPoll()