From patchwork Sun Jun 29 12:14:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 32676 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f199.google.com (mail-pd0-f199.google.com [209.85.192.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E135623577 for ; Sun, 29 Jun 2014 12:22:48 +0000 (UTC) Received: by mail-pd0-f199.google.com with SMTP id r10sf31562999pdi.10 for ; Sun, 29 Jun 2014 05:22:47 -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=5OjNrdiMdLUxqMbluUF2IWlGqKwboiuTyy57aoYoIEQ=; b=a18Q7y8j3dSbmv4FiDDwHpd5QNv9RhtRfVD4up401doXrOj8s3BYLm7fwnsGkBNUQz JToqQWZsiONBxhrfkfS9kuEwije5/dhMytFN4MxDAdJxiLNmc+2qJF4a9Oi3/C4BXG9F MXVbKHzQMyTbs/EvaxMD7Otg+3L9S8YDhw3/EYaUU1/bwGJsOd2LGLUzgxegJS+lZ8vF hAws2A8x+ZzL3gZgfmpCgsGW5Pf7+wxDwiWSYTO1smXHKIVl8+NfSfq3RZ38QhexbntV E3YgyIH53Xq/PgnYRtzMoDCpt1B3sU1gHDAQ4o0XVmxdSTaAjVb3oywPsFzfN0fmOiYE ySgg== X-Gm-Message-State: ALoCoQmQSDKVskCIe/KtPJIDKJ13P/WT72eWiL8TnXkYBoxKyFkwa3qyMk3ZjzD6bbDKh0gwvm1j X-Received: by 10.68.242.74 with SMTP id wo10mr11831104pbc.0.1404044567752; Sun, 29 Jun 2014 05:22:47 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.104.177 with SMTP id a46ls1208367qgf.7.gmail; Sun, 29 Jun 2014 05:22:47 -0700 (PDT) X-Received: by 10.58.46.141 with SMTP id v13mr31948665vem.18.1404044567587; Sun, 29 Jun 2014 05:22:47 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id k4si8825942vch.63.2014.06.29.05.22.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 29 Jun 2014 05:22:47 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id hy10so6491002vcb.17 for ; Sun, 29 Jun 2014 05:22:47 -0700 (PDT) X-Received: by 10.52.69.172 with SMTP id f12mr27103880vdu.26.1404044567483; Sun, 29 Jun 2014 05:22: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 tc5csp72618vcb; Sun, 29 Jun 2014 05:22:47 -0700 (PDT) X-Received: by 10.224.129.68 with SMTP id n4mr51298326qas.66.1404044566963; Sun, 29 Jun 2014 05:22:46 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id j69si21204734qga.17.2014.06.29.05.22.46 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 29 Jun 2014 05:22: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]:57569 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1E86-0000Y5-JX for patch@linaro.org; Sun, 29 Jun 2014 08:22:46 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47676) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1E0j-0004GG-HQ for qemu-devel@nongnu.org; Sun, 29 Jun 2014 08:15:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X1E0Y-0000cS-2C for qemu-devel@nongnu.org; Sun, 29 Jun 2014 08:15:09 -0400 Received: from [2001:4b98:dc0:45:216:3eff:fe3d:166f] (port=41885 helo=afflict.kos.to) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1E0X-0000ay-R1 for qemu-devel@nongnu.org; Sun, 29 Jun 2014 08:14:57 -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 6F25D26595; 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:53 +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: Peter Maydell , Anthony Liguori , Paul Burton Subject: [Qemu-devel] [PULL v2 13/13] linux-user: support the SIOCGIFINDEX 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.172 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 SIOCGIFINDEX ioctl, allowing its use by target programs. Signed-off-by: Paul Burton Signed-off-by: Riku Voipio --- linux-user/ioctls.h | 1 + linux-user/syscall_defs.h | 1 + 2 files changed, 2 insertions(+) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index f278d3e..07a00da 100644 --- a/linux-user/ioctls.h +++ b/linux-user/ioctls.h @@ -118,6 +118,7 @@ IOCTL(SIOCSIFMEM, IOC_W, MK_PTR(MK_STRUCT(STRUCT_ptr_ifreq))) IOCTL(SIOCADDMULTI, IOC_W, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq))) IOCTL(SIOCDELMULTI, IOC_W, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq))) + IOCTL(SIOCGIFINDEX, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq))) IOCTL(SIOCSIFLINK, 0, TYPE_NULL) IOCTL_SPECIAL(SIOCGIFCONF, IOC_W | IOC_R, do_ioctl_ifconf, MK_PTR(MK_STRUCT(STRUCT_ifconf))) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 4adfd3a..8563027 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -865,6 +865,7 @@ struct target_pollfd { #define TARGET_SIOCSIFSLAVE 0x8930 #define TARGET_SIOCADDMULTI 0x8931 /* Multicast address lists */ #define TARGET_SIOCDELMULTI 0x8932 +#define TARGET_SIOCGIFINDEX 0x8933 /* Bridging control calls */ #define TARGET_SIOCGIFBR 0x8940 /* Bridging support */