[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 3 of 4 v2] libxl: Introduce pci_assignable_add and pci_assignable_remove



On Mon, 2012-05-21 at 15:13 +0100, Konrad Rzeszutek Wilk wrote:
> On Mon, May 14, 2012 at 10:21:33AM +0100, Ian Campbell wrote:
> > > +
> > > +/* Scan through /sys/.../pciback/slots looking for pcidev's BDF */
> > > +static int pciback_dev_has_slot(libxl__gc *gc, libxl_device_pci *pcidev)
> > > +{
> > > +    libxl_ctx *ctx = libxl__gc_owner(gc);
> > > +    FILE *f;
> > > +    int rc = 0;
> > > +    unsigned dom, bus, dev, func;
> > > +
> > > +    f = fopen(SYSFS_PCIBACK_DRIVER"/slots", "r");
> > > +
> > > +    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) {
> 
> And the last one should be %d.

This patch went in already, can someone send an incremental fix
please?

Ian.




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.