From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: [PATCH 3 of 4 v2] libxl: Introduce pci_assignable_add and pci_assignable_remove Date: Mon, 14 May 2012 11:06:00 +0100 Message-ID: <4FB0D908.9070201@eu.citrix.com> References: <5e21532dab5b1c31e54e.1336743092@kodo2> <1336987293.31817.41.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1336987293.31817.41.camel@zakaz.uk.xensource.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: Ian Campbell Cc: "xen-devel@lists.xensource.com" , Konrad Rzeszutek Wilk List-Id: xen-devel@lists.xenproject.org On 14/05/12 10:21, Ian Campbell wrote: >> + >> + if (f == NULL) { >> + LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "Couldn't open %s", >> + SYSFS_PCIBACK_DRIVER"/slots"); >> + return ERROR_FAIL; >> + } >> + >> + while(fscanf(f, "%x:%x:%x.%x\n",&dom,&bus,&dev,&func)==3) { > Shouldn't this 3 be 4 now that you include dom? Ah, of course -- this is handling a case that doesn't happen normally when you use the commands (i.e., having a slot in pciback but not being bound), so it didn't get tested. I'll make sure to check that. > Also ISTR some change to the precise formatting using by the kernel for > BDFs recently (A . became a : or vice versa?). CCing Konrad for input in > case it impacts this too. That would be pretty unfortunate; but it seems like it would also be pretty unlikely, as it would break an awful lot of user-mode programs, yes? Linus seems to have a zero-tolerance policy towards that kind of thing. I'll fix this up, re-test, and wait for Konrad's comment before re-sending. -George