From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [v2][PATCH 1/2] libxl: introduce libxl__is_igd_vga_passthru Date: Wed, 11 Mar 2015 11:26:28 +0000 Message-ID: <1426073188.21353.186.camel__14690.555263269$1426073293$gmane$org@citrix.com> References: <1425980538-5508-1-git-send-email-tiejun.chen@intel.com> <1425980538-5508-2-git-send-email-tiejun.chen@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1425980538-5508-2-git-send-email-tiejun.chen@intel.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org 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 List-Id: xen-devel@lists.xenproject.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.