Lines Matching refs:result
62 int result; member
132 …nline void ncp_finish_request(struct ncp_server *server, struct ncp_request_reply *req, int result) in ncp_finish_request() argument
134 req->result = result; in ncp_finish_request()
218 int result; in __ncptcp_try_send() local
226 result = do_send(server->ncp_sock, iovc, rq->tx_iovlen, in __ncptcp_try_send()
229 if (result == -EAGAIN) in __ncptcp_try_send()
232 if (result < 0) { in __ncptcp_try_send()
233 printk(KERN_ERR "ncpfs: tcp: Send failed: %d\n", result); in __ncptcp_try_send()
234 __ncp_abort_request(server, rq, result); in __ncptcp_try_send()
237 if (result >= rq->tx_totallen) { in __ncptcp_try_send()
242 rq->tx_totallen -= result; in __ncptcp_try_send()
244 while (iov->iov_len <= result) { in __ncptcp_try_send()
245 result -= iov->iov_len; in __ncptcp_try_send()
249 iov->iov_base += result; in __ncptcp_try_send()
250 iov->iov_len -= result; in __ncptcp_try_send()
390 int result; in ncpdgram_rcv_proc() local
392 result = _recv(sock, &reply, sizeof(reply), MSG_PEEK | MSG_DONTWAIT); in ncpdgram_rcv_proc()
393 if (result < 0) { in ncpdgram_rcv_proc()
396 if (result >= sizeof(reply)) { in ncpdgram_rcv_proc()
405 result = _recv(sock, buf, sizeof(buf), MSG_DONTWAIT); in ncpdgram_rcv_proc()
406 if (result < 0) { in ncpdgram_rcv_proc()
407 DPRINTK("recv failed with %d\n", result); in ncpdgram_rcv_proc()
410 if (result < 10) { in ncpdgram_rcv_proc()
411 DPRINTK("too short (%u) watchdog packet\n", result); in ncpdgram_rcv_proc()
423 …result = _recv(sock, server->unexpected_packet.data, sizeof(server->unexpected_packet.data), MSG_D… in ncpdgram_rcv_proc()
424 if (result < 0) { in ncpdgram_rcv_proc()
427 info_server(server, 0, server->unexpected_packet.data, result); in ncpdgram_rcv_proc()
439 result = _recv(sock, server->rxbuf, req->datalen, MSG_DONTWAIT); in ncpdgram_rcv_proc()
441 if (result >= 0 && server->sign_active && req->tx_type != NCP_DEALLOC_SLOT_REQUEST) { in ncpdgram_rcv_proc()
442 if (result < 8 + 8) { in ncpdgram_rcv_proc()
443 result = -EIO; in ncpdgram_rcv_proc()
447 result -= 8; in ncpdgram_rcv_proc()
449 …ign_verify_reply(server, server->rxbuf + hdrl, result - hdrl, cpu_to_le32(result), server->rxbuf +… in ncpdgram_rcv_proc()
451 result = -EIO; in ncpdgram_rcv_proc()
458 ncp_finish_request(server, req, result); in ncpdgram_rcv_proc()
510 int result; in do_tcp_rcv() local
513 result = _recv(server->ncp_sock, buffer, len, MSG_DONTWAIT); in do_tcp_rcv()
520 result = _recv(server->ncp_sock, dummy, len, MSG_DONTWAIT); in do_tcp_rcv()
522 if (result < 0) { in do_tcp_rcv()
523 return result; in do_tcp_rcv()
525 if (result > len) { in do_tcp_rcv()
526 printk(KERN_ERR "ncpfs: tcp: bug in recvmsg (%u > %Zu)\n", result, len); in do_tcp_rcv()
529 return result; in do_tcp_rcv()
536 int result; in __ncptcp_rcv_proc() local
542 result = do_tcp_rcv(server, server->rcv.ptr, server->rcv.len); in __ncptcp_rcv_proc()
543 if (result == -EAGAIN) { in __ncptcp_rcv_proc()
546 if (result <= 0) { in __ncptcp_rcv_proc()
553 if (result < 0) { in __ncptcp_rcv_proc()
554 printk(KERN_ERR "ncpfs: tcp: error in recvmsg: %d\n", result); in __ncptcp_rcv_proc()
561 server->rcv.ptr += result; in __ncptcp_rcv_proc()
563 server->rcv.len -= result; in __ncptcp_rcv_proc()
701 int result; in do_ncp_rpc_call() local
716 result = ncp_add_request(server, req); in do_ncp_rpc_call()
717 if (result < 0) in do_ncp_rpc_call()
722 result = -EINTR; in do_ncp_rpc_call()
726 result = req->result; in do_ncp_rpc_call()
731 return result; in do_ncp_rpc_call()
741 int result; in ncp_do_request() local
776 result = do_ncp_rpc_call(server, size, reply, max_reply_size); in ncp_do_request()
784 DDPRINTK("do_ncp_rpc_call returned %d\n", result); in ncp_do_request()
786 return result; in ncp_do_request()
798 int result; in ncp_request2() local
812 result = ncp_do_request(server, server->current_size, reply, size); in ncp_request2()
813 if (result < 0) { in ncp_request2()
814 DPRINTK("ncp_request_error: %d\n", result); in ncp_request2()
819 server->reply_size = result; in ncp_request2()
820 server->ncp_reply_size = result - sizeof(struct ncp_reply_header); in ncp_request2()
822 result = reply->completion_code; in ncp_request2()
824 if (result != 0) in ncp_request2()
825 PPRINTK("ncp_request: completion code=%x\n", result); in ncp_request2()
827 return result; in ncp_request2()
833 int result; in ncp_connect() local
843 result = ncp_do_request(server, sizeof(*h), server->packet, server->packet_size); in ncp_connect()
844 if (result < 0) in ncp_connect()
847 result = 0; in ncp_connect()
849 return result; in ncp_connect()