All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: elena.ufimtseva@oracle.com, wei.liu2@citrix.com,
	stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com,
	dario.faggioli@citrix.com, ian.jackson@eu.citrix.com,
	xen-devel@lists.xen.org, jbeulich@suse.com, keir@xen.org,
	dgdegra@tycho.nsa.gov
Subject: Re: [PATCH v7 5/5] libxl: Add interface for querying hypervisor about PCI topology
Date: Tue, 21 Apr 2015 12:27:53 +0100	[thread overview]
Message-ID: <1429615673.4743.59.camel@citrix.com> (raw)
In-Reply-To: <1429289966-4121-6-git-send-email-boris.ostrovsky@oracle.com>

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@citrix.com>

Ian

      reply	other threads:[~2015-04-21 11:27 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-17 16:59 [PATCH v7 0/5] Display IO topology when PXM data is available (plus some cleanup) Boris Ostrovsky
2015-04-17 16:59 ` [PATCH v7 1/5] sysctl: Make XEN_SYSCTL_numainfo a little more efficient Boris Ostrovsky
2015-04-17 17:14   ` Andrew Cooper
2015-04-17 16:59 ` [PATCH v7 2/5] sysctl: Add sysctl interface for querying PCI topology Boris Ostrovsky
2015-04-17 17:16   ` Andrew Cooper
2015-04-21  7:01   ` Jan Beulich
2015-04-21 12:56     ` Boris Ostrovsky
2015-04-21 13:14       ` Andrew Cooper
2015-04-21 13:13         ` Boris Ostrovsky
2015-04-21 13:30           ` Andrew Cooper
2015-04-21 13:18       ` Jan Beulich
2015-04-23 22:20     ` Boris Ostrovsky
2015-04-24  7:19       ` Jan Beulich
2015-04-24 14:09         ` Boris Ostrovsky
2015-04-24 17:42           ` Boris Ostrovsky
2015-05-01 13:56             ` Ian Campbell
2015-05-01 15:20               ` Boris Ostrovsky
2015-05-01 15:31                 ` Ian Campbell
2015-04-17 16:59 ` [PATCH v7 3/5] libxl/libxc: Move libxl_get_cpu_topology()'s hypercall buffer management to libxc Boris Ostrovsky
2015-04-17 16:59 ` [PATCH v7 4/5] libxl/libxc: Move libxl_get_numainfo()'s " Boris Ostrovsky
2015-04-17 16:59 ` [PATCH v7 5/5] libxl: Add interface for querying hypervisor about PCI topology Boris Ostrovsky
2015-04-21 11:27   ` Ian Campbell [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1429615673.4743.59.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=dario.faggioli@citrix.com \
    --cc=dgdegra@tycho.nsa.gov \
    --cc=elena.ufimtseva@oracle.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=keir@xen.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.