OSDN Git Service

libbpf: Add pathname_concat() helper
authorWang Yufen <wangyufen@huawei.com>
Thu, 22 Sep 2022 06:28:44 +0000 (14:28 +0800)
committerAndrii Nakryiko <andrii@kernel.org>
Fri, 23 Sep 2022 21:18:03 +0000 (14:18 -0700)
commite588c116df6ca64a295017571151992c76d03132
treeddad21aaae675826b80cc974ed208359b28bbf7b
parente0401dce5e28fb7118dbfd055c77d94433778a85
libbpf: Add pathname_concat() helper

Move snprintf and len check to common helper pathname_concat() to make the
code simpler.

Signed-off-by: Wang Yufen <wangyufen@huawei.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/1663828124-10437-1-git-send-email-wangyufen@huawei.com
tools/lib/bpf/libbpf.c