From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id EBDC57CEB for ; Mon, 15 Apr 2019 09:34:29 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Apr 2019 00:34:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,352,1549958400"; d="scan'208";a="164790350" Received: from lgosiewx-mobl.ger.corp.intel.com ([10.103.104.80]) by fmsmga001.fm.intel.com with ESMTP; 15 Apr 2019 00:34:26 -0700 From: Lukasz Gosiewski To: david.hunt@intel.com Cc: dev@dpdk.org, lukaszx.krakowiak@intel.com Date: Mon, 15 Apr 2019 09:33:57 +0200 Message-Id: <20190415073357.9816-1-lukaszx.gosiewski@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20190403115251.10768-1-lukaszx.krakowiak@intel.com> References: <20190403115251.10768-1-lukaszx.krakowiak@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Tue, 16 Apr 2019 18:14:11 +0200 Subject: [dpdk-dev] [PATCH v2 1/3] power: update for handling fifo path string X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2019 07:34:30 -0000 From: Lukasz Krakowiak Removed doubled created fifo path string for channel info. --- v2: * rebase to master changes 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 0187f79ab..05c0eea44 100644 --- a/examples/vm_power_manager/channel_manager.c +++ b/examples/vm_power_manager/channel_manager.c @@ -24,6 +24,7 @@ #include #include #include +#include #include @@ -362,8 +363,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", @@ -563,8 +562,8 @@ add_host_channel(void) "channel '%s'\n", socket_path); return 0; } - strlcpy(chan_info->channel_path, socket_path, - sizeof(chan_info->channel_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.17.1 -------------------------------------------------------------- Intel Research and Development Ireland Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id EDDCCA00E6 for ; Tue, 16 Apr 2019 18:14:20 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 506751B526; Tue, 16 Apr 2019 18:14:13 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id EBDC57CEB for ; Mon, 15 Apr 2019 09:34:29 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Apr 2019 00:34:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,352,1549958400"; d="scan'208";a="164790350" Received: from lgosiewx-mobl.ger.corp.intel.com ([10.103.104.80]) by fmsmga001.fm.intel.com with ESMTP; 15 Apr 2019 00:34:26 -0700 From: Lukasz Gosiewski To: david.hunt@intel.com Cc: dev@dpdk.org, lukaszx.krakowiak@intel.com Date: Mon, 15 Apr 2019 09:33:57 +0200 Message-Id: <20190415073357.9816-1-lukaszx.gosiewski@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20190403115251.10768-1-lukaszx.krakowiak@intel.com> References: <20190403115251.10768-1-lukaszx.krakowiak@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Tue, 16 Apr 2019 18:14:11 +0200 Subject: [dpdk-dev] [PATCH v2 1/3] power: update for handling fifo path string X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190415073357.mce7woaQnpMxjT9qt-nVxACwoJ7h_FDHkxsBaaCBaHU@z> From: Lukasz Krakowiak Removed doubled created fifo path string for channel info. --- v2: * rebase to master changes 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 0187f79ab..05c0eea44 100644 --- a/examples/vm_power_manager/channel_manager.c +++ b/examples/vm_power_manager/channel_manager.c @@ -24,6 +24,7 @@ #include #include #include +#include #include @@ -362,8 +363,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", @@ -563,8 +562,8 @@ add_host_channel(void) "channel '%s'\n", socket_path); return 0; } - strlcpy(chan_info->channel_path, socket_path, - sizeof(chan_info->channel_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.17.1 -------------------------------------------------------------- Intel Research and Development Ireland Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.