mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
bpftool: Do not check return value from libbpf_set_strict_mode()
The function always returns 0, so we don't need to check whether the
return value is 0 or not.
This change was first introduced in commit a777e18f1b
("bpftool: Use
libbpf 1.0 API mode instead of RLIMIT_MEMLOCK"), but later reverted to
restore the unconditional rlimit bump in bpftool. Let's re-add it.
Co-developed-by: Yafang Shao <laoar.shao@gmail.com>
Signed-off-by: Quentin Monnet <quentin@isovalent.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20220610112648.29695-3-quentin@isovalent.com
This commit is contained in:
parent
6b4384ff10
commit
93270357da
1 changed files with 1 additions and 3 deletions
|
@ -507,9 +507,7 @@ int main(int argc, char **argv)
|
||||||
* It will still be rejected if users use LIBBPF_STRICT_ALL
|
* It will still be rejected if users use LIBBPF_STRICT_ALL
|
||||||
* mode for loading generated skeleton.
|
* mode for loading generated skeleton.
|
||||||
*/
|
*/
|
||||||
ret = libbpf_set_strict_mode(LIBBPF_STRICT_ALL & ~LIBBPF_STRICT_MAP_DEFINITIONS);
|
libbpf_set_strict_mode(LIBBPF_STRICT_ALL & ~LIBBPF_STRICT_MAP_DEFINITIONS);
|
||||||
if (ret)
|
|
||||||
p_err("failed to enable libbpf strict mode: %d", ret);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
argc -= optind;
|
argc -= optind;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue