summaryrefslogtreecommitdiff
path: root/lib/librte_eal
diff options
context:
space:
mode:
authorIntel <intel.com>2013-11-08 03:00:00 +0100
committerThomas Monjalon <thomas.monjalon@6wind.com>2013-11-23 23:48:21 +0100
commitce1f9117b37c9490f88d1cbb54bab85bfe291dee (patch)
treeecd4b115c7ab9036a920ee10b0d2620c866a4b8a /lib/librte_eal
parent53784a6090eedb0464aec3fe34508e569f6c1102 (diff)
downloaddpdk-ce1f9117b37c9490f88d1cbb54bab85bfe291dee.zip
dpdk-ce1f9117b37c9490f88d1cbb54bab85bfe291dee.tar.gz
dpdk-ce1f9117b37c9490f88d1cbb54bab85bfe291dee.tar.xz
pci: fix sysfs parsing for uio
Signed-off-by: Intel
Diffstat (limited to 'lib/librte_eal')
-rw-r--r--lib/librte_eal/linuxapp/eal/eal_pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c
index 73c0828..f5c5626 100644
--- a/lib/librte_eal/linuxapp/eal/eal_pci.c
+++ b/lib/librte_eal/linuxapp/eal/eal_pci.c
@@ -524,7 +524,7 @@ pci_uio_map_resource(struct rte_pci_device *dev)
/* first try uio%d */
errno = 0;
uio_num = strtoull(e->d_name + shortprefix_len, &endptr, 10);
- if (errno == 0 && endptr != e->d_name) {
+ if (errno == 0 && endptr != (e->d_name + shortprefix_len)) {
rte_snprintf(dirname2, sizeof(dirname2),
"%s/uio%u", dirname, uio_num);
break;
@@ -533,7 +533,7 @@ pci_uio_map_resource(struct rte_pci_device *dev)
/* then try uio:uio%d */
errno = 0;
uio_num = strtoull(e->d_name + longprefix_len, &endptr, 10);
- if (errno == 0 && endptr != e->d_name) {
+ if (errno == 0 && endptr != (e->d_name + longprefix_len)) {
rte_snprintf(dirname2, sizeof(dirname2),
"%s/uio:uio%u", dirname, uio_num);
break;