]> git.droids-corp.org - dpdk.git/commitdiff
virtio: fix build with debug enabled
authorThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 3 Mar 2015 15:04:59 +0000 (16:04 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 4 Mar 2015 10:18:53 +0000 (11:18 +0100)
With CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_INIT=y:
error: ‘devname’ undeclared (first use in this function)

Fixes: da978dfdc43b ("virtio: use port IO to get PCI resource")
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
lib/librte_pmd_virtio/virtio_ethdev.c

index 4bad1e4474ec241b2a7e549513be5ccbcb8e2d16..d239083266f2de1aeeccafcd82cf960ad016875c 100644 (file)
@@ -971,7 +971,7 @@ static int virtio_resource_init_by_uio(struct rte_pci_device *pci_dev)
        pci_dev->intr_handle.fd = open(dirname, O_RDWR);
        if (pci_dev->intr_handle.fd < 0) {
                PMD_INIT_LOG(ERR, "Cannot open %s: %s\n",
-                       devname, strerror(errno));
+                       dirname, strerror(errno));
                return -1;
        }