pdump: fix error handlings
authorReshma Pattan <reshma.pattan@intel.com>
Wed, 13 Jul 2016 16:29:08 +0000 (17:29 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Sat, 16 Jul 2016 09:13:22 +0000 (11:13 +0200)
commite4ffa2d3dc7fcb2318db78ee963f5a3726a094b7
tree2f7f01e9f8fa7e82cb59a1b0bc3f57ed7c5c8d17
parent6596554669ea6a888fe4ae61acacdae65015bf12
pdump: fix error handlings

The changes include
1)If mkdir fails for user passed socket paths log error and return.

2)At some places return value was set to errno and that non-negative number
was returned, but the intention was to return negative value.
So now rte_errno was set to errno and returning the actual negative value
that the APIs has returned.

Fixes: 278f945402c5 ("pdump: add new library for packet capture")

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
lib/librte_pdump/rte_pdump.c