Commit 9f2e9014 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

sk-queue: recvmsg saves a error code in errno

Probably sys_recvmsg was used earlier, which returns a error code.
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent eb3f46f3
......@@ -127,9 +127,9 @@ int dump_sk_queue(int sock_fd, int sock_id)
ret = pe.length = recvmsg(sock_fd, &msg, MSG_DONTWAIT | MSG_PEEK);
if (ret < 0) {
if (ret == -EAGAIN)
if (errno == EAGAIN)
break; /* we're done */
pr_perror("sys_recvmsg fail: error\n");
pr_perror("recvmsg fail: error\n");
goto err_set_sock;
}
if (msg.msg_flags & MSG_TRUNC) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment