From: Ilya Maximets Date: Thu, 6 Jul 2017 13:30:43 +0000 (+0300) Subject: vhost: print reason of NUMA node query failure X-Git-Tag: spdx-start~2703 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=185a88359742a7002b282b3b91e63cf723e4fd42;p=dpdk.git vhost: print reason of NUMA node query failure syscall always returns '-1' on failure and there is no point in printing that value. 'errno' is much more informative. Fixes: 586e39001317 ("vhost: export numa node") Signed-off-by: Ilya Maximets Acked-by: Yuanhan Liu --- diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c index 653152fc7d..0b6aa1cc4f 100644 --- a/lib/librte_vhost/vhost.c +++ b/lib/librte_vhost/vhost.c @@ -40,6 +40,7 @@ #include #endif +#include #include #include #include @@ -295,7 +296,8 @@ rte_vhost_get_numa_node(int vid) MPOL_F_NODE | MPOL_F_ADDR); if (ret < 0) { RTE_LOG(ERR, VHOST_CONFIG, - "(%d) failed to query numa node: %d\n", vid, ret); + "(%d) failed to query numa node: %s\n", + vid, rte_strerror(errno)); return -1; }