From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48076) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVemY-0004qG-1e for qemu-devel@nongnu.org; Wed, 11 Mar 2015 07:26:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YVemU-0007ZM-Su for qemu-devel@nongnu.org; Wed, 11 Mar 2015 07:26:33 -0400 Received: from smtp.citrix.com ([66.165.176.89]:7420) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVemU-0007ZF-Oi for qemu-devel@nongnu.org; Wed, 11 Mar 2015 07:26:30 -0400 Message-ID: <1426073188.21353.186.camel@citrix.com> From: Ian Campbell Date: Wed, 11 Mar 2015 11:26:28 +0000 In-Reply-To: <1425980538-5508-2-git-send-email-tiejun.chen@intel.com> References: <1425980538-5508-1-git-send-email-tiejun.chen@intel.com> <1425980538-5508-2-git-send-email-tiejun.chen@intel.com> Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [v2][PATCH 1/2] libxl: introduce libxl__is_igd_vga_passthru List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Tiejun Chen Cc: Ian.Jackson@eu.citrix.com, wei.liu2@citrix.com, qemu-devel@nongnu.org, stefano.stabellini@citrix.com, xen-devel@lists.xen.org On Tue, 2015-03-10 at 17:42 +0800, Tiejun Chen wrote: > While working with qemu, IGD is a specific device in the case of pass through > so we need to identify that to handle more later. Here we define a table to > record all IGD types currently we can support. Also we need to introduce two > helper functions to get vendor and device ids to lookup that table. > > Signed-off-by: Tiejun Chen Acked-by: Ian Campbell > + FILE *f = fopen(pci_device_vendor_path, "r"); I was about to ask if we should use the carefd construct here, but libxl_pci.c is full of fopen, so this isn't making things any worse at least.