From: Anatoly Burakov Date: Fri, 2 Mar 2018 08:41:36 +0000 (+0000) Subject: eal: fix errno handling in IPC X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=139653a09a485bf550e00964ce2c81a2991a7530;p=dpdk.git eal: fix errno handling in IPC Fixes: bacaa2754017 ("eal: add channel for multi-process communication") Cc: stable@dpdk.org Signed-off-by: Anatoly Burakov Acked-by: Jianfeng Tan --- diff --git a/lib/librte_eal/common/eal_common_proc.c b/lib/librte_eal/common/eal_common_proc.c index 2dddcaf783..3a1088e2f4 100644 --- a/lib/librte_eal/common/eal_common_proc.c +++ b/lib/librte_eal/common/eal_common_proc.c @@ -444,13 +444,13 @@ send_msg(const char *dst_path, struct rte_mp_msg *msg, int type) if (snd < 0) { rte_errno = errno; /* Check if it caused by peer process exits */ - if (errno == -ECONNREFUSED) { + if (errno == ECONNREFUSED) { /* We don't unlink the primary's socket here */ if (rte_eal_process_type() == RTE_PROC_PRIMARY) unlink_socket_by_path(dst_path); return 0; } - if (errno == -ENOBUFS) { + if (errno == ENOBUFS) { RTE_LOG(ERR, EAL, "Peer cannot receive message %s\n", dst_path); return 0;