git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/bnx2x: convert to new Rx offloads API
[dpdk.git]
/
app
/
pdump
/
main.c
diff --git
a/app/pdump/main.c
b/app/pdump/main.c
index
0f70c75
..
d29de03
100644
(file)
--- a/
app/pdump/main.c
+++ b/
app/pdump/main.c
@@
-24,6
+24,7
@@
#include <rte_kvargs.h>
#include <rte_mempool.h>
#include <rte_ring.h>
#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"
#include <rte_pdump.h>
#define CMD_LINE_OPT_PDUMP "pdump"
@@
-408,17
+409,15
@@
launch_args_parse(int argc, char **argv, char *prgname)
if (!strncmp(long_option[option_index].name,
CMD_LINE_OPT_SER_SOCK_PATH,
sizeof(CMD_LINE_OPT_SER_SOCK_PATH))) {
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))) {
}
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;
}
break;
@@
-882,5
+881,9
@@
main(int argc, char **argv)
/* dump debug stats */
print_pdump_stats();
/* dump debug stats */
print_pdump_stats();
+ ret = rte_eal_cleanup();
+ if (ret)
+ printf("Error from rte_eal_cleanup(), %d\n", ret);
+
return 0;
}
return 0;
}