Port-xen archive

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

Re: [PATCH v3 7/7] libxl: Add interface for querying hypervisor about PCI topology



On Mon, Feb 09, 2015 at 03:04:35PM -0500, Boris Ostrovsky wrote:
[...]
> +#ifdef  LIBXL_HAVE_PCITOPO
> +libxl_pcitopology *libxl_get_pci_topology(libxl_ctx *ctx, int *num_devs)
> +{
> +    GC_INIT(ctx);
> +    physdev_pci_device_t *devs;
> +    uint8_t *nodes;
> +    libxl_pcitopology *ret = NULL;
> +    int i, rc;
> +
> +    *num_devs = libxl__pci_numdevs(gc);
> +    if (*num_devs <= 0) {
> +        LOG(ERROR, "Unable to determine number of PCI devices");

Is 0 an error? What if the system actually have no PCI devices?

The rest looks OK to me.

Wei.


Home | Main Index | Thread Index | Old Index