From nobody Mon Feb 9 19:53:25 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=1579116253; cv=none; d=zohomail.com; s=zohoarc; b=jdLhdA+ln+NNb/+a++sJ6EbmZWYaJrl6GXB/AxhEiEekVlW3waneFeSyD6Z+WQcr2HyPmStei6LIq0UY7gc59ArkPvxgkNTI37UF+hX21WexOhye35f5658/Eawkl+wOG6fRSLbcQvib2YO1XCSHM7NuueUUSYaAkhKcwk9mvUI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579116253; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=fV+yZ7QwNYdKQIdvuyBouFmEp6hj0Q6W2Cl7NXJBpAc=; b=F/qjT9cK11Eq/oGj+pYsHyXQCMii8Q89cRg3chDWwrOyZnciY5zCQOaYGOE4OXJnkFYW0/pzxljgP59AtPzCGjpFUF0SaZ/YEqqxz1KobB0n9EEvHrawhP/cug64A6pkhkGczW6QekPyYN9OAYOaR1NnJTiWRzwrdOQ0yDjgwwA= 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 1579116253686258.6360757632125; Wed, 15 Jan 2020 11:24:13 -0800 (PST) Received: from localhost ([::1]:59362 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iroGx-0006af-W2 for importer@patchew.org; Wed, 15 Jan 2020 14:24:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34246) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iro5b-00077Q-1o for qemu-devel@nongnu.org; Wed, 15 Jan 2020 14:12:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iro5Z-00030g-Sc for qemu-devel@nongnu.org; Wed, 15 Jan 2020 14:12:26 -0500 Received: from mx2.rt-rk.com ([89.216.37.149]:53843 helo=mail.rt-rk.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iro5Z-0002rA-Lv for qemu-devel@nongnu.org; Wed, 15 Jan 2020 14:12:25 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id A43871A21BC; Wed, 15 Jan 2020 20:12:10 +0100 (CET) Received: from rtrkw493-lin.domain.local (rtrkw493-lin.domain.local [10.10.14.93]) by mail.rt-rk.com (Postfix) with ESMTPSA id 376FC1A21FF; Wed, 15 Jan 2020 20:12:10 +0100 (CET) X-Virus-Scanned: amavisd-new at rt-rk.com From: Filip Bozuta To: qemu-devel@nongnu.org Subject: [PATCH v7 13/13] linux-user: Add support for TYPE_LONG and TYPE_ULONG in do_ioctl() Date: Wed, 15 Jan 2020 20:12:03 +0100 Message-Id: <1579115523-4159-14-git-send-email-Filip.Bozuta@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1579115523-4159-1-git-send-email-Filip.Bozuta@rt-rk.com> References: <1579115523-4159-1-git-send-email-Filip.Bozuta@rt-rk.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 89.216.37.149 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: peter.maydell@linaro.org, berrange@redhat.com, arnd@arndb.de, richard.henderson@linaro.org, laurent@vivier.eu, jcmvbkbc@gmail.com, amarkovic@wavecomp.com, philmd@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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 --- linux-user/syscall.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index a3993a2..2ba2c5c 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -5176,6 +5176,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.7.4