eal: save error in string copy
authorThomas Monjalon <thomas@monjalon.net>
Sun, 13 Jun 2021 08:24:21 +0000 (16:24 +0800)
committerDavid Marchand <david.marchand@redhat.com>
Mon, 5 Jul 2021 13:11:30 +0000 (15:11 +0200)
commitdbba7c9efbb9ed5cfc88c192213f54b1f9942c00
tree02dd8d7ef08581822beca45101b0fbba55a28dca
parent487c58250780516979283691c14188d293906a5d
eal: save error in string copy

The string copy api rte_strscpy() did not set rte_errno during failures,
instead it just returned negative error number.

Set rte_errrno if the destination buffer is too small.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
doc/guides/rel_notes/release_21_08.rst
lib/eal/common/eal_common_string_fns.c
lib/eal/common/eal_common_trace.c
lib/eal/include/rte_string_fns.h
lib/graph/node.c