From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ilya Maximets Subject: [PATCH] vhost: print the reason on numa node obtaining failure Date: Thu, 06 Jul 2017 16:30:43 +0300 Message-ID: <1499347843-6948-1-git-send-email-i.maximets@samsung.com> References: Cc: Heetae Ahn , Ilya Maximets To: dev@dpdk.org, Yuanhan Liu Return-path: Received: from mailout3.w1.samsung.com (mailout3.w1.samsung.com [210.118.77.13]) by dpdk.org (Postfix) with ESMTP id 648212C8 for ; Thu, 6 Jul 2017 15:30:52 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OSO004EW87ER230@mailout3.w1.samsung.com> for dev@dpdk.org; Thu, 06 Jul 2017 14:30:50 +0100 (BST) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- lib/librte_vhost/vhost.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c index 19c5a43..fa29d45 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; } -- 2.7.4