From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id F27732C12; Mon, 26 Jun 2017 08:48:52 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP; 25 Jun 2017 23:48:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,394,1493708400"; d="scan'208";a="871717486" Received: from dpdk06.sh.intel.com ([10.67.111.82]) by FMSMGA003.fm.intel.com with ESMTP; 25 Jun 2017 23:48:50 -0700 From: Jianfeng Tan To: dev@dpdk.org Cc: harry.van.haaren@intel.com, Jianfeng Tan , stable@dpdk.org Date: Mon, 26 Jun 2017 06:49:46 +0000 Message-Id: <1498459786-4523-1-git-send-email-jianfeng.tan@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-stable] [PATCH] eal: fix wrong config file path X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 06:48:53 -0000 When primary process is booted with --file-prefix option, the API, rte_eal_primary_proc_alive(), uses a wrong config file path to check if primary process is alive. Fix it by calling helper function to get config file path. Fixes: dd3e00138d74 ("eal: check if primary process is alive") Cc: stable@dpdk.org Signed-off-by: Jianfeng Tan --- lib/librte_eal/common/eal_common_proc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/librte_eal/common/eal_common_proc.c b/lib/librte_eal/common/eal_common_proc.c index 12e0fca..60526ca 100644 --- a/lib/librte_eal/common/eal_common_proc.c +++ b/lib/librte_eal/common/eal_common_proc.c @@ -46,10 +46,10 @@ rte_eal_primary_proc_alive(const char *config_file_path) if (config_file_path) config_fd = open(config_file_path, O_RDONLY); else { - char default_path[PATH_MAX+1]; - snprintf(default_path, PATH_MAX, RUNTIME_CONFIG_FMT, - default_config_dir, "rte"); - config_fd = open(default_path, O_RDONLY); + const char *path; + + path = eal_runtime_config_path(); + config_fd = open(path, O_RDONLY); } if (config_fd < 0) return 0; -- 2.7.4