summaryrefslogtreecommitdiff
path: root/net/ipv4
diff options
context:
space:
mode:
authorTony Ambardar <tony.ambardar@gmail.com>2020-07-21 05:48:16 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2020-07-22 00:42:56 +0300
commit9165e1d70fb34ce438e78aad90408cfa86e4c2d0 (patch)
tree4ee3fd51ccb60e80ab2b36248670abdcf5ef128e /net/ipv4
parent8fca4f98af0bf112b485fff02779b84d3a069eac (diff)
downloadlinux-9165e1d70fb34ce438e78aad90408cfa86e4c2d0.tar.xz
bpftool: Use only nftw for file tree parsing
The bpftool sources include code to walk file trees, but use multiple frameworks to do so: nftw and fts. While nftw conforms to POSIX/SUSv3 and is widely available, fts is not conformant and less common, especially on non-glibc systems. The inconsistent framework usage hampers maintenance and portability of bpftool, in particular for embedded systems. Standardize code usage by rewriting one fts-based function to use nftw and clean up some related function warnings by extending use of "const char *" arguments. This change helps in building bpftool against musl for OpenWrt. Also fix an unsafe call to dirname() by duplicating the string to pass, since some implementations may directly alter it. The same approach is used in libbpf.c. Signed-off-by: Tony Ambardar <Tony.Ambardar@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Reviewed-by: Quentin Monnet <quentin@isovalent.com> Link: https://lore.kernel.org/bpf/20200721024817.13701-1-Tony.Ambardar@gmail.com
Diffstat (limited to 'net/ipv4')
0 files changed, 0 insertions, 0 deletions