DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] power: update for handling fifo path string
@ 2019-04-03 11:52 Lukasz Krakowiak
  2019-04-03 11:52 ` Lukasz Krakowiak
                   ` (4 more replies)
  0 siblings, 5 replies; 23+ messages in thread
From: Lukasz Krakowiak @ 2019-04-03 11:52 UTC (permalink / raw)
  To: david.hunt; +Cc: dev, Lukasz Krakowiak

Removed doubled created fifo path string for channel info.

Signed-off-by: Lukasz Krakowiak <lukaszx.krakowiak@intel.com>
---
 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 <rte_log.h>
 #include <rte_atomic.h>
 #include <rte_spinlock.h>
+#include <rte_string_fns.h>
 
 #include <libvirt/libvirt.h>
 
@@ -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

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2019-07-04 20:06 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-03 11:52 [dpdk-dev] [PATCH] power: update for handling fifo path string Lukasz Krakowiak
2019-04-03 11:52 ` Lukasz Krakowiak
2019-04-15  7:33 ` [dpdk-dev] [PATCH v2 1/3] " Lukasz Gosiewski
2019-04-15  7:33   ` Lukasz Gosiewski
2019-04-15 10:01 ` [dpdk-dev] [PATCH v3] " Lukasz Gosiewski
2019-04-15 10:01   ` Lukasz Gosiewski
2019-04-15 15:50   ` Hunt, David
2019-04-15 15:50     ` Hunt, David
2019-04-16  7:02 ` Lukasz Gosiewski
2019-04-16  7:02   ` Lukasz Gosiewski
2019-04-16  8:16   ` Hunt, David
2019-04-16  8:16     ` Hunt, David
2019-04-16  8:19     ` Krakowiak, LukaszX
2019-04-16  8:19       ` Krakowiak, LukaszX
2019-04-16  8:23       ` Gosiewski, LukaszX
2019-04-16  8:23         ` Gosiewski, LukaszX
2019-04-16 16:17         ` Ferruh Yigit
2019-04-16 16:17           ` Ferruh Yigit
2019-04-16 10:20 ` [dpdk-dev] [PATCH v4] " Lukasz Gosiewski
2019-04-16 10:20   ` Lukasz Gosiewski
2019-04-17 12:21   ` Hunt, David
2019-04-17 12:21     ` Hunt, David
2019-07-04 20:06     ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).