Lines Matching refs:ret
99 int ret; in vchan_wr() local
103 ret = libxenvchan_write(ctrl, inbuf, insiz); in vchan_wr()
104 if (ret < 0) { in vchan_wr()
109 fprintf(stderr, "wrote %d bytes to vchan\n", ret); in vchan_wr()
110 if (ret > 0) { in vchan_wr()
111 insiz -= ret; in vchan_wr()
112 memmove(inbuf, inbuf + ret, insiz); in vchan_wr()
117 int ret; in socket_wr() local
121 ret = write(output_fd, outbuf, outsiz); in socket_wr()
122 if (ret < 0 && errno != EAGAIN) in socket_wr()
124 if (ret > 0) { in socket_wr()
125 outsiz -= ret; in socket_wr()
126 memmove(outbuf, outbuf + ret, outsiz); in socket_wr()
228 int ret; in connect_vchan() local
257 ret = xc_domain_getinfo(xc, domid, 1, &dominfo); in connect_vchan()
260 if (ret == -1 && errno == ESRCH) in connect_vchan()
262 if (ret == 1 && (dominfo.domid != (uint32_t)domid || dominfo.dying)) in connect_vchan()
291 int ret; in data_loop() local
316 ret = select(max_fd + 1, &rfds, &wfds, NULL, NULL); in data_loop()
317 if (ret < 0) { in data_loop()
339 ret = read(state->input_fd, inbuf + insiz, BUFSIZE - insiz); in data_loop()
340 if (ret < 0 && errno != EAGAIN) in data_loop()
343 fprintf(stderr, "from-unix: %.*s\n", ret, inbuf + insiz); in data_loop()
344 if (ret == 0) { in data_loop()
358 if (ret) in data_loop()
359 insiz += ret; in data_loop()
365 ret = libxenvchan_read(state->ctrl, outbuf + outsiz, in data_loop()
367 if (ret < 0) in data_loop()
370 fprintf(stderr, "from-vchan: %.*s\n", ret, outbuf + outsiz); in data_loop()
371 outsiz += ret; in data_loop()
403 int ret; in main() local
470 ret = 0; in main()
486 ret = 1; in main()
501 ret = 1; in main()
509 ret = 1; in main()
532 return ret; in main()