From patchwork Mon Jun 23 13:26:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 32364 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yk0-f198.google.com (mail-yk0-f198.google.com [209.85.160.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DA03F23B18 for ; Mon, 23 Jun 2014 13:37:14 +0000 (UTC) Received: by mail-yk0-f198.google.com with SMTP id 9sf16128334ykp.9 for ; Mon, 23 Jun 2014 06:37:14 -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=YoempIGUs+6hlXn2Bf6keCJKc4KcnQQoKU/bYbZXWCE=; b=ezHd9R++Rte8AZWEycBxVua1OAzD+/tiKl6GdJmnr3i69Rgbl7/OMSqV6ENrF2UTmX 78agRZtvw6pNJ7GgChUtvZ7NmG93OfmI82i1RIA663Llh4wgCFfMguU3ivo7XzfIcpNU m46B6bg14UPptk/bdYqaVJfEqMz0z2NT01Wbc86Y6u6oeBmTct9IqaRSEwGp6RNWbniL C86S+X79HagwSeWlKX1lyF5tYmOU338ZYZpp8IJdmOC7jeNEFM5eoYfYuz80saj5BoVt YJa9yEeNevCKgCWR4LclIpdME9XrYCPCtSRFkOaxhkOGcrdtPaeoxm1kiuIq4Yfkghsq /8Tg== X-Gm-Message-State: ALoCoQkjwcC4U3S7qt3H0hdnZ118HDpVEnNplOChMUJO1YabU34vl25JEMwKFDinG1tJzIcM3Ve2 X-Received: by 10.236.35.5 with SMTP id t5mr9280358yha.9.1403530634718; Mon, 23 Jun 2014 06:37:14 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.95.179 with SMTP id i48ls1856786qge.82.gmail; Mon, 23 Jun 2014 06:37:14 -0700 (PDT) X-Received: by 10.52.88.44 with SMTP id bd12mr411222vdb.86.1403530634659; Mon, 23 Jun 2014 06:37:14 -0700 (PDT) Received: from mail-ve0-f177.google.com (mail-ve0-f177.google.com [209.85.128.177]) by mx.google.com with ESMTPS id li19si8983599vdb.62.2014.06.23.06.37.14 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 23 Jun 2014 06:37:14 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.177 as permitted sender) client-ip=209.85.128.177; Received: by mail-ve0-f177.google.com with SMTP id i13so6036779veh.22 for ; Mon, 23 Jun 2014 06:37:14 -0700 (PDT) X-Received: by 10.58.186.207 with SMTP id fm15mr19613928vec.4.1403530634582; Mon, 23 Jun 2014 06:37:14 -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 tc5csp131324vcb; Mon, 23 Jun 2014 06:37:14 -0700 (PDT) X-Received: by 10.140.48.45 with SMTP id n42mr31331208qga.107.1403530633814; Mon, 23 Jun 2014 06:37:13 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id z66si22693210qgd.33.2014.06.23.06.37.13 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 23 Jun 2014 06:37:13 -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]:53596 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wz4Qr-0000HR-9P for patch@linaro.org; Mon, 23 Jun 2014 09:37:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55722) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wz4Go-0003iW-3A for qemu-devel@nongnu.org; Mon, 23 Jun 2014 09:26:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wz4Ge-0001CO-5H for qemu-devel@nongnu.org; Mon, 23 Jun 2014 09:26:50 -0400 Received: from [2001:4b98:dc0:45:216:3eff:fe3d:166f] (port=37373 helo=afflict.kos.to) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wz4Gd-0001Bn-VD for qemu-devel@nongnu.org; Mon, 23 Jun 2014 09:26:40 -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 C86F926645; Mon, 23 Jun 2014 15:26:36 +0200 (CEST) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Mon, 23 Jun 2014 16:26:33 +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: 2001:4b98:dc0:45:216:3eff:fe3d:166f Cc: Paul Burton Subject: [Qemu-devel] [PULL 18/19] 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.128.177 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 769c661..c4dbe4f 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -3696,6 +3696,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