mem: allow full length name
authorZoltan Kiss <zoltan.kiss@schaman.hu>
Wed, 20 Jul 2016 17:16:39 +0000 (18:16 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 21 Jul 2016 21:05:01 +0000 (23:05 +0200)
commit32e17fd571e0139c140674f94a0c3823129af551
tree2da837903d53c196e1178cafa4b454964865a282
parentd23a6bd04d728226c99d6995c8bd65d49d7e61d1
mem: allow full length name

(strlen(name) == sizeof(mz->name) - 1) is a valid case, change the
condition to reflect that.
Move it earlier to avoid lookup with invalid name.
Change errno to ENAMETOOLONG.

Fixes: 85cf0079 ("mem: avoid memzone/mempool/ring name truncation")

Signed-off-by: Zoltan Kiss <zoltan.kiss@schaman.hu>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
lib/librte_eal/common/eal_common_memzone.c