#include <rte_kvargs.h>
#include <rte_mempool.h>
#include <rte_ring.h>
+#include <rte_string_fns.h>
#include <rte_pdump.h>
#define CMD_LINE_OPT_PDUMP "pdump"
if (!strncmp(long_option[option_index].name,
CMD_LINE_OPT_SER_SOCK_PATH,
sizeof(CMD_LINE_OPT_SER_SOCK_PATH))) {
- snprintf(server_socket_path,
- sizeof(server_socket_path), "%s",
- optarg);
+ strlcpy(server_socket_path, optarg,
+ sizeof(server_socket_path));
}
if (!strncmp(long_option[option_index].name,
CMD_LINE_OPT_CLI_SOCK_PATH,
sizeof(CMD_LINE_OPT_CLI_SOCK_PATH))) {
- snprintf(client_socket_path,
- sizeof(client_socket_path), "%s",
- optarg);
+ strlcpy(client_socket_path, optarg,
+ sizeof(client_socket_path));
}
break;
/* dump debug stats */
print_pdump_stats();
+ ret = rte_eal_cleanup();
+ if (ret)
+ printf("Error from rte_eal_cleanup(), %d\n", ret);
+
return 0;
}