From: Ian Campbell Subject: Re: [PATCH] libxl: When checking BDF of existing slots, function should be decimal, not hex Date: Tue, 29 May 2012 10:00:00 +0100 Message-ID: <1338282000.14158.70.camel@zakaz.uk.xensource.com> References: <1c28051020488782f127.1337963657@exile> <20120525202758.GB23655@phenom.dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20120525202758.GB23655@phenom.dumpdata.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: Konrad Rzeszutek Wilk Cc: George Dunlap , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Fri, 2012-05-25 at 21:27 +0100, Konrad Rzeszutek Wilk wrote: > On Fri, May 25, 2012 at 04:34:17PM +0000, George Dunlap wrote: > > # HG changeset patch > > # User George Dunlap > > # Date 1337961666 0 > > # Node ID 1c28051020488782f1277dd60a2418324580297e > > # Parent 69c3ae25bb1ddcb0ea44b7566d36d34e9d6a70aa > > libxl: When checking BDF of existing slots, function should be decimal, not hex > > > > Spotted-by: Konrad Wilk > > Acked-by: Konrad Rzeszutek Wilk > > Signed-off-by: George Dunlap A PCI func can be at most 7 I think so %x vs %d probably doesn't have any real impact under normal use. Applied though. > > > > diff --git a/tools/libxl/libxl_pci.c b/tools/libxl/libxl_pci.c > > --- a/tools/libxl/libxl_pci.c > > +++ b/tools/libxl/libxl_pci.c > > @@ -480,7 +480,7 @@ static int pciback_dev_has_slot(libxl__g > > return ERROR_FAIL; > > } > > > > - while(fscanf(f, "%x:%x:%x.%x\n", &dom, &bus, &dev, &func)==4) { > > + while(fscanf(f, "%x:%x:%x.%d\n", &dom, &bus, &dev, &func)==4) { > > if(dom == pcidev->domain > > && bus == pcidev->bus > > && dev == pcidev->dev > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xen.org > > http://lists.xen.org/xen-devel > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel