From patchwork Sun Jun 29 12:14:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 32672 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f70.google.com (mail-oa0-f70.google.com [209.85.219.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7FC0623577 for ; Sun, 29 Jun 2014 12:19:48 +0000 (UTC) Received: by mail-oa0-f70.google.com with SMTP id m1sf44737883oag.9 for ; Sun, 29 Jun 2014 05:19:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=z9D/DE/aV2vcssqtXgXKy5/ZSvqoSQbC/FIvHXtAcJ0=; b=e9mhRX/8aS0WvOJATtZRLZ8IxetTgxoi6Z4oUjIQ7f0k3hCVfjkbxLN4PcUXKuFT5e +rHEM40JTWw0dOF3eeDUCLr7C8FKKnAl4stI7UNC9ytFYiekcOHgVjljbotK0Hu57HSX VQQuFsVlMPQzbwQUlyPiWIBraEGj7ljFh6Tv/4BrMTMEZT7mQGZLF7hbsXS0+7fvKiQG 0P8+DkHmESPaCfyGZqsW81X/Q8sCoFaTvLeelxktEyLFr2GbPLaovWDHG3DNkobMBKhL dTziy1jiYhhxGx53t8kR2W84azVqnKGcI2Cpg/kjTP8OZCtO2SfxN6QE3w6VaEDyBkR3 Zi0g== X-Gm-Message-State: ALoCoQkalNB6YYN1EfYqpTEl79ZcSNtqRuiyozOehIv7uf8WlGDfXe20JW3phGLElUP6QJ57TOuG X-Received: by 10.50.170.162 with SMTP id an2mr12709154igc.4.1404044388050; Sun, 29 Jun 2014 05:19:48 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.48.112 with SMTP id n103ls1176965qga.86.gmail; Sun, 29 Jun 2014 05:19:47 -0700 (PDT) X-Received: by 10.58.56.102 with SMTP id z6mr31178066vep.7.1404044387891; Sun, 29 Jun 2014 05:19:47 -0700 (PDT) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id ga2si8804104vdc.81.2014.06.29.05.19.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 29 Jun 2014 05:19:47 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.175 as permitted sender) client-ip=209.85.220.175; Received: by mail-vc0-f175.google.com with SMTP id hy4so6523401vcb.20 for ; Sun, 29 Jun 2014 05:19:47 -0700 (PDT) X-Received: by 10.220.203.134 with SMTP id fi6mr22065662vcb.18.1404044387828; Sun, 29 Jun 2014 05:19:47 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp72498vcb; Sun, 29 Jun 2014 05:19:47 -0700 (PDT) X-Received: by 10.224.25.206 with SMTP id a14mr19004539qac.35.1404044386839; Sun, 29 Jun 2014 05:19:46 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id a91si7031664qga.53.2014.06.29.05.19.46 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 29 Jun 2014 05:19:46 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:57535 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1E5C-0003mA-AP for patch@linaro.org; Sun, 29 Jun 2014 08:19:46 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47641) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1E0g-0004AN-Sw for qemu-devel@nongnu.org; Sun, 29 Jun 2014 08:15:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X1E0c-0000lR-F0 for qemu-devel@nongnu.org; Sun, 29 Jun 2014 08:15:06 -0400 Received: from afflict.kos.to ([92.243.29.197]:54996) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1E0Y-0000cC-3z for qemu-devel@nongnu.org; Sun, 29 Jun 2014 08:15:02 -0400 Received: from afflict.kos.to (afflict [92.243.29.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by afflict.kos.to (Postfix) with ESMTPSA id 638072658D; Sun, 29 Jun 2014 14:14:56 +0200 (CEST) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Sun, 29 Jun 2014 15:14:52 +0300 Message-Id: X-Mailer: git-send-email 1.7.10.4 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 92.243.29.197 Cc: Peter Maydell , Anthony Liguori , Paul Burton Subject: [Qemu-devel] [PULL v2 12/13] linux-user: support the KDSIGACCEPT ioctl X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: riku.voipio@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.175 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Paul Burton Add a definition of the KDSIGACCEPT ioctl & allow its use by target programs. Signed-off-by: Paul Burton Signed-off-by: Riku Voipio --- linux-user/ioctls.h | 1 + linux-user/syscall.c | 7 +++++++ linux-user/syscall_defs.h | 1 + 3 files changed, 9 insertions(+) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index 309fb21..f278d3e 100644 --- a/linux-user/ioctls.h +++ b/linux-user/ioctls.h @@ -64,6 +64,7 @@ IOCTL(KDSKBLED, 0, TYPE_INT) IOCTL(KDGETLED, 0, TYPE_INT) IOCTL(KDSETLED, 0, TYPE_INT) + IOCTL_SPECIAL(KDSIGACCEPT, 0, do_ioctl_kdsigaccept, TYPE_INT) IOCTL(BLKROSET, IOC_W, MK_PTR(TYPE_INT)) IOCTL(BLKROGET, IOC_R, MK_PTR(TYPE_INT)) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 8e2762b..5a272d3 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -3689,6 +3689,13 @@ static abi_long do_ioctl_rt(const IOCTLEntry *ie, uint8_t *buf_temp, return ret; } +static abi_long do_ioctl_kdsigaccept(const IOCTLEntry *ie, uint8_t *buf_temp, + int fd, abi_long cmd, abi_long arg) +{ + int sig = target_to_host_signal(arg); + return get_errno(ioctl(fd, ie->host_cmd, sig)); +} + static IOCTLEntry ioctl_entries[] = { #define IOCTL(cmd, access, ...) \ { TARGET_ ## cmd, cmd, #cmd, access, 0, { __VA_ARGS__ } }, diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index a1f1fce..4adfd3a 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -831,6 +831,7 @@ struct target_pollfd { #define TARGET_KDSKBLED 0x4B65 /* set led flags (not lights) */ #define TARGET_KDGETLED 0x4B31 /* return current led state */ #define TARGET_KDSETLED 0x4B32 /* set led state [lights, not flags] */ +#define TARGET_KDSIGACCEPT 0x4B4E #define TARGET_SIOCATMARK 0x8905