From nobody Tue Feb 10 13:36:33 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1579768176; cv=none; d=zohomail.com; s=zohoarc; b=HVlcH0ampBoErWqSGBlKUl97/8H/s9da0X+6cBzbnK/t6EpBoKHt1rjbO8uv/r3UpgdHfSEvS8YDgosmx7Q3NEZzjg8cmYoo6c1mzFhbe8X4MnMEvPNUBwx2YlQAfZHoFaijBX1OTyFtiSza6aMHnGaXC6h06A0ZD1xQrW+Byts= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579768176; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=aJ2uSgCoMoKMbUXLFQPRJK/fC/9YcmTUO2dkGFwQYO0=; b=kPUbi1LpUqkKjcqagFx11hjAp06Qscqk10yfZRybD4C0IFjavjmVFsSrE9dd7QodtnhNkfpMMMNZDW6yPApljbO43BG5cgLfUJ/KtBsTlSJ4Dc5V7Pt0g5qz6DrxIFsuGVL3lSybsNNdPsUQNfc1NOI4gsj4qasqbLgIL7gXt6I= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1579768176727655.8416779265608; Thu, 23 Jan 2020 00:29:36 -0800 (PST) Received: from localhost ([::1]:53086 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iuXrr-0001ur-B4 for importer@patchew.org; Thu, 23 Jan 2020 03:29:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56094) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iuXlV-0001NK-EC for qemu-devel@nongnu.org; Thu, 23 Jan 2020 03:23:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iuXlU-0003Ay-9K for qemu-devel@nongnu.org; Thu, 23 Jan 2020 03:23:01 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:45953) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iuXlU-0003AA-0c for qemu-devel@nongnu.org; Thu, 23 Jan 2020 03:23:00 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1N3KgE-1jdBtt2N6Y-010IyB; Thu, 23 Jan 2020 09:22:39 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 11/17] linux-user: Add support for TYPE_LONG and TYPE_ULONG in do_ioctl() Date: Thu, 23 Jan 2020 09:22:21 +0100 Message-Id: <20200123082227.2037994-12-laurent@vivier.eu> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200123082227.2037994-1-laurent@vivier.eu> References: <20200123082227.2037994-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:eodUeUisqAWTjs8Z6zmqWWfREn5jIMk2MN+z4os6X6525iNoGp2 7LvDCVFEcM9e9ytPZrQ7rR/GJxcxbadcfPpwWnD5NoMdLbZifmNveNgX/Ng8hY6vTzdKB5y asucmhijVP3swoD6sLPf6URHiskM9AilVKBqax2NVvX3vFGGvrOR7o2C3WbqhVq9B0B2ofk ZSUGV32eXbXTFxcEabICg== X-UI-Out-Filterresults: notjunk:1;V03:K0:vjhQCSNrnj0=:epYK75BkDWtyB3unix3kVR jR0uYmRDDJXW4CgitDGstporfbIqpwS0YlJjKCwPhVayRacLd3Ss8iJIRG9ZRELOUXNZX+sqP t0nMaBFBAHsSgYSeEnbaaj/Wo1qQLm6gA9YL9qD5RE8uLOAVJT4DG8APa+j+H6qIjbja9UXIW AcXCOYpXp713db0zBkKsQdABH+6tdHcdRKKAKftTImTEMkcLeV0if3CGuLmd4vNiFSFftTLLN yMYZ6Chxj04ThvyZgrjvIIGKYnCJ/of4NCjGUo58dkmqB4OOgetou3yovsVK0paJrgNS2rAHz wUsRcOWh+XhpC25KySjmvCnYC8pERICBJdDjGBM1dfqpyA/2qc3B5K6Byoyp3+2DP30pkF/tZ Q69bwG7DbMIPu4Ndfs9aZBeof2j5jb6mvErOhLf6CxNVFOkWIEeL6eOv9s7eZXxykePeStTjU /IuxffiE+vp4nCKad407xe+IeG/ZnC7S6vG4bD6jJw3+UMd8SsWs4MShKFudsaOs7Ky9QGN1T KvIL/Ag+Kg565HhCaFXRZAb4aVpkZx5UW7JYx/9/GspICh8xSaPUXg+X0BZFEFWHqNNFBlxyM ty1QSEwf1NqiXJgmB9bjkuDu/yWTj+E4+OuMLer8zi8PRssnIO9gKGMqHnn5xP4Al4DqjPtTB JUXEwGDS5nfCD5VEPdat2J0iAczC+NsSdWbmAr1NecPLVh5mQ627VMMrfeQ60ay8iZ5OBSurL Knc+YMso97lflBZ/CC54kt/hi6nrkp8iijcT1Yr8y5hNJesvM6b3GCQTfyrvimPt7Fjs02Kn7 NALSXTIxkeJSTxgRF8bQWS3HfJlaccZdzEMxLlVQkgDrmw6NNHT/J+MHBopOFGM6C00AEeT X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.126.130 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Riku Voipio , Laurent Vivier , Filip Bozuta Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Filip Bozuta Function "do_ioctl()" located in file "syscall.c" was missing an option for TYPE_LONG and TYPE_ULONG. This caused some ioctls to not be recognised because they had the third argument that was of type 'long' or 'unsigned long'. For example: Since implemented ioctls RTC_IRQP_SET and RTC_EPOCH_SET are of type IOW(writing type) that have unsigned long as their third argument, they were not recognised in QEMU before the changes of this patch. Signed-off-by: Filip Bozuta Reviewed-by: Laurent Vivier Message-Id: <1579117007-7565-14-git-send-email-Filip.Bozuta@rt-rk.com> Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index c5bda60b45de..bd2436b31007 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -5178,6 +5178,8 @@ static abi_long do_ioctl(int fd, int cmd, abi_long ar= g) break; case TYPE_PTRVOID: case TYPE_INT: + case TYPE_LONG: + case TYPE_ULONG: ret =3D get_errno(safe_ioctl(fd, ie->host_cmd, arg)); break; case TYPE_PTR: --=20 2.24.1