From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukasz Krakowiak Subject: [PATCH] power: update for handling fifo path string Date: Wed, 3 Apr 2019 13:52:51 +0200 Message-ID: <20190403115251.10768-1-lukaszx.krakowiak@intel.com> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: dev@dpdk.org, Lukasz Krakowiak To: david.hunt@intel.com Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 521381B209 for ; Wed, 3 Apr 2019 13:53:05 +0200 (CEST) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Removed doubled created fifo path string for channel info. Signed-off-by: Lukasz Krakowiak --- examples/vm_power_manager/channel_manager.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/examples/vm_power_manager/channel_manager.c b/examples/vm_power_manager/channel_manager.c index 09bfa5c0d..f1dd8cbf3 100644 --- a/examples/vm_power_manager/channel_manager.c +++ b/examples/vm_power_manager/channel_manager.c @@ -23,6 +23,7 @@ #include #include #include +#include #include @@ -361,8 +362,6 @@ setup_host_channel_info(struct channel_info **chan_info_dptr, chan_info->status = CHANNEL_MGR_CHANNEL_DISCONNECTED; chan_info->type = CHANNEL_TYPE_JSON; - fifo_path(chan_info->channel_path, sizeof(chan_info->channel_path)); - if (open_host_channel(chan_info) < 0) { RTE_LOG(ERR, CHANNEL_MANAGER, "Could not open host channel: " "'%s'\n", @@ -562,8 +561,8 @@ add_host_channel(void) "channel '%s'\n", socket_path); return 0; } - snprintf(chan_info->channel_path, - sizeof(chan_info->channel_path), "%s", socket_path); + rte_strlcpy(chan_info->channel_path, socket_path, UNIX_PATH_MAX); + if (setup_host_channel_info(&chan_info, 0) < 0) { rte_free(chan_info); return 0; -- 2.19.2.windows.1