git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6817219
)
pdump: fix error check when creating/canceling thread
author
Olivier Matz
<olivier.matz@6wind.com>
Fri, 8 Dec 2017 10:20:13 +0000
(11:20 +0100)
committer
Thomas Monjalon
<thomas@monjalon.net>
Wed, 17 Jan 2018 17:49:38 +0000
(18:49 +0100)
On error, pthread_create() returns a positive number (an errno)
but does not set the errno variable.
Fixes:
278f945402c5
("pdump: add new library for packet capture")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
lib/librte_pdump/rte_pdump.c
patch
|
blob
|
history
diff --git
a/lib/librte_pdump/rte_pdump.c
b/lib/librte_pdump/rte_pdump.c
index
ba43d14
..
ec8a5d8
100644
(file)
--- a/
lib/librte_pdump/rte_pdump.c
+++ b/
lib/librte_pdump/rte_pdump.c
@@
-552,7
+552,7
@@
rte_pdump_init(const char *path)
if (ret != 0) {
RTE_LOG(ERR, PDUMP,
"Failed to create the pdump thread:%s, %s:%d\n",
- strerror(
errno
), __func__, __LINE__);
+ strerror(
ret
), __func__, __LINE__);
return -1;
}
/* Set thread_name for aid in debugging. */
@@
-575,7
+575,7
@@
rte_pdump_uninit(void)
if (ret != 0) {
RTE_LOG(ERR, PDUMP,
"Failed to cancel the pdump thread:%s, %s:%d\n",
- strerror(
errno
), __func__, __LINE__);
+ strerror(
ret
), __func__, __LINE__);
return -1;
}