From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38872) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSTEA-0000e1-VC for qemu-devel@nongnu.org; Fri, 12 Sep 2014 11:57:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XSTE5-0000nU-Sy for qemu-devel@nongnu.org; Fri, 12 Sep 2014 11:57:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:2866) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSTE5-0000nP-Md for qemu-devel@nongnu.org; Fri, 12 Sep 2014 11:57:33 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s8CFvWMd015179 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 12 Sep 2014 11:57:33 -0400 From: Kevin Wolf Date: Fri, 12 Sep 2014 17:57:01 +0200 Message-Id: <1410537426-9917-18-git-send-email-kwolf@redhat.com> In-Reply-To: <1410537426-9917-1-git-send-email-kwolf@redhat.com> References: <1410537426-9917-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PULL 17/22] iotests: Send the correct fd in socket_scm_helper List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com From: Stratos Psomadakis Make sure to pass the correct fd via SCM_RIGHTS in socket_scm_helper.c (i.e. fd_to_send, not socket-fd). Signed-off-by: Stratos Psomadakis Signed-off-by: Dimitris Aragiorgis Signed-off-by: Kevin Wolf --- tests/qemu-iotests/socket_scm_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/socket_scm_helper.c b/tests/qemu-iotests/socket_scm_helper.c index 0e2b285..8195983 100644 --- a/tests/qemu-iotests/socket_scm_helper.c +++ b/tests/qemu-iotests/socket_scm_helper.c @@ -52,7 +52,7 @@ static int send_fd(int fd, int fd_to_send) cmsg->cmsg_len = CMSG_LEN(sizeof(int)); cmsg->cmsg_level = SOL_SOCKET; cmsg->cmsg_type = SCM_RIGHTS; - memcpy(CMSG_DATA(cmsg), &fd, sizeof(int)); + memcpy(CMSG_DATA(cmsg), &fd_to_send, sizeof(int)); do { ret = sendmsg(fd, &msg, 0); -- 1.8.3.1