From patchwork Fri Jul 15 11:09:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 9231705 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B93E560574 for ; Fri, 15 Jul 2016 11:09:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AB08828325 for ; Fri, 15 Jul 2016 11:09:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9FD192832C; Fri, 15 Jul 2016 11:09:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 37A7028325 for ; Fri, 15 Jul 2016 11:09:58 +0000 (UTC) Received: from localhost ([::1]:59871 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bO10G-0001sD-MW for patchwork-qemu-devel@patchwork.kernel.org; Fri, 15 Jul 2016 07:09:56 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50152) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bO0zy-0001rx-TX for qemu-devel@nongnu.org; Fri, 15 Jul 2016 07:09:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bO0zu-0007OT-00 for qemu-devel@nongnu.org; Fri, 15 Jul 2016 07:09:37 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:58296) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bO0zt-0007OD-Ou for qemu-devel@nongnu.org; Fri, 15 Jul 2016 07:09:33 -0400 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.84_2) (envelope-from ) id 1bO0zr-0000nI-FZ; Fri, 15 Jul 2016 12:09:31 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Fri, 15 Jul 2016 12:09:31 +0100 Message-Id: <1468580971-28794-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.9.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PATCH] linux-user: Fix type for SIOCATMARK ioctl X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Riku Voipio , patches@linaro.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP The SIOCATMARK ioctl takes an argument which should be a pointer to an integer where the kernel will write the result. We were incorrectly declaring it as TYPE_NULL which would mean it would always fail (with EFAULT) when it should succeed. Correct the type. Signed-off-by: Peter Maydell --- This fixes a failure in the LTP sockioctl01 test. linux-user/ioctls.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index 4b36baa..7e2c133 100644 --- a/linux-user/ioctls.h +++ b/linux-user/ioctls.h @@ -120,7 +120,7 @@ MK_PTR(MK_STRUCT(STRUCT_fiemap))) #endif - IOCTL(SIOCATMARK, 0, TYPE_NULL) + IOCTL(SIOCATMARK, IOC_R, MK_PTR(TYPE_INT)) IOCTL(SIOCGIFNAME, IOC_RW, MK_PTR(TYPE_INT)) IOCTL(SIOCGIFFLAGS, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_short_ifreq))) IOCTL(SIOCSIFFLAGS, IOC_W, MK_PTR(MK_STRUCT(STRUCT_short_ifreq)))