commit | bb180fb2401dfed0ba85699064e60d62af351ff9 | [log] [tgz] |
---|---|---|
author | Andrii Nakryiko <andriin@fb.com> | Tue Aug 18 14:33:52 2020 -0700 |
committer | Alexei Starovoitov <ast@kernel.org> | Tue Aug 18 17:16:15 2020 -0700 |
tree | 0c6ba401827dad65fc08dddd000da2ff60e138d1 | |
parent | 47b6cb4d0add454859f386337e6079e01ac7db8f [diff] |
libbpf: Factor out common logic of testing and closing FD Factor out common piece of logic that detects support for a feature based on successfully created FD. Also take care of closing FD, if it was created. Signed-off-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20200818213356.2629020-4-andriin@fb.com