From patchwork Mon Jun 23 13:26:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 362906 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id E6B011400A7 for ; Mon, 23 Jun 2014 23:35:56 +1000 (EST) Received: from localhost ([::1]:53581 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wz4Pa-0007cJ-QO for incoming@patchwork.ozlabs.org; Mon, 23 Jun 2014 09:35:55 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55711) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wz4Gn-0003iV-UP for qemu-devel@nongnu.org; Mon, 23 Jun 2014 09:26:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wz4Gd-0001CA-V7 for qemu-devel@nongnu.org; Mon, 23 Jun 2014 09:26:49 -0400 Received: from [2001:4b98:dc0:45:216:3eff:fe3d:166f] (port=37368 helo=afflict.kos.to) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wz4Gd-0001Ab-Om for qemu-devel@nongnu.org; Mon, 23 Jun 2014 09:26:39 -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 D49EC26646; 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:34 +0300 Message-Id: <1f1fb45ffe2a67bc1853b55b1d029fcee37d546a.1403529801.git.riku.voipio@linaro.org> 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 19/19] 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 */