[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v7 5/5] libxl: Add interface for querying hypervisor about PCI topology
On Fri, 2015-04-17 at 12:59 -0400, Boris Ostrovsky wrote: > +int libxl__pci_numdevs(libxl__gc *gc) > +{ > + DIR *dir; > + struct dirent *entry; > + int num_devs = 0; > + > + dir = opendir("/sys/bus/pci/devices"); > + if (!dir) { > + LOGEV(ERROR, errno, "Cannot open /sys/bus/pci/devices"); LOGEV is only useful if you want to log an errnoval which isn't actually in errno, so here you could just use LOGE. > + dir = opendir("/sys/bus/pci/devices"); > + if (!dir) { > + LOGEV(ERROR, errno, "Cannot open /sys/bus/pci/devices"); And again. [...] > + if (sscanf(entry->d_name, "%x:%x:%x.%d", &dom, &bus, &dev, &func) < > 4) { > + LOGEV(ERROR, errno, "Error processing /sys/bus/pci/devices"); Again. With all those fixed: Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Ian _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |