Lines Matching refs:result
62 int result;
132 static inline void ncp_finish_request(struct ncp_server *server, struct ncp_request_reply *req, int result)
134 req->result = result;
218 int result;
226 result = do_send(server->ncp_sock, iovc, rq->tx_iovlen,
229 if (result == -EAGAIN)
232 if (result < 0) {
233 printk(KERN_ERR "ncpfs: tcp: Send failed: %d\n", result);
234 __ncp_abort_request(server, rq, result);
237 if (result >= rq->tx_totallen) {
242 rq->tx_totallen -= result;
244 while (iov->iov_len <= result) {
245 result -= iov->iov_len;
249 iov->iov_base += result;
250 iov->iov_len -= result;
390 int result;
392 result = _recv(sock, &reply, sizeof(reply), MSG_PEEK | MSG_DONTWAIT);
393 if (result < 0) {
396 if (result >= sizeof(reply)) {
405 result = _recv(sock, buf, sizeof(buf), MSG_DONTWAIT);
406 if (result < 0) {
407 DPRINTK("recv failed with %d\n", result);
410 if (result < 10) {
411 DPRINTK("too short (%u) watchdog packet\n", result);
423 result = _recv(sock, server->unexpected_packet.data, sizeof(server->unexpected_packet.data), MSG_DONTWAIT);
424 if (result < 0) {
427 info_server(server, 0, server->unexpected_packet.data, result);
439 result = _recv(sock, server->rxbuf, req->datalen, MSG_DONTWAIT);
441 if (result >= 0 && server->sign_active && req->tx_type != NCP_DEALLOC_SLOT_REQUEST) {
442 if (result < 8 + 8) {
443 result = -EIO;
447 result -= 8;
449 if (sign_verify_reply(server, server->rxbuf + hdrl, result - hdrl, cpu_to_le32(result), server->rxbuf + result)) {
451 result = -EIO;
458 ncp_finish_request(server, req, result);
510 int result;
513 result = _recv(server->ncp_sock, buffer, len, MSG_DONTWAIT);
520 result = _recv(server->ncp_sock, dummy, len, MSG_DONTWAIT);
522 if (result < 0) {
523 return result;
525 if (result > len) {
526 printk(KERN_ERR "ncpfs: tcp: bug in recvmsg (%u > %Zu)\n", result, len);
529 return result;
534 /* We have to check the result, so store the complete header */
536 int result;
542 result = do_tcp_rcv(server, server->rcv.ptr, server->rcv.len);
543 if (result == -EAGAIN) {
546 if (result <= 0) {
553 if (result < 0) {
554 printk(KERN_ERR "ncpfs: tcp: error in recvmsg: %d\n", result);
561 server->rcv.ptr += result;
563 server->rcv.len -= result;
701 int result;
716 result = ncp_add_request(server, req);
717 if (result < 0)
722 result = -EINTR;
726 result = req->result;
731 return result;
741 int result;
771 result = do_ncp_rpc_call(server, size, reply, max_reply_size);
779 DDPRINTK("do_ncp_rpc_call returned %d\n", result);
781 return result;
793 int result;
807 result = ncp_do_request(server, server->current_size, reply, size);
808 if (result < 0) {
809 DPRINTK("ncp_request_error: %d\n", result);
814 server->reply_size = result;
815 server->ncp_reply_size = result - sizeof(struct ncp_reply_header);
817 result = reply->completion_code;
819 if (result != 0)
820 PPRINTK("ncp_request: completion code=%x\n", result);
822 return result;
828 int result;
838 result = ncp_do_request(server, sizeof(*h), server->packet, server->packet_size);
839 if (result < 0)
842 result = 0;
844 return result;