]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lib/caputils: split to multiple functions, add test
authorKarel Zak <kzak@redhat.com>
Fri, 20 Nov 2020 10:21:41 +0000 (11:21 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 20 Nov 2020 10:21:41 +0000 (11:21 +0100)
commit966420219cde98e72dd518e4f0005cb0c090a00d
tree8afef90a1c0fbb492cc10ffb8a0b90d809c3f5c6
parent1b54a74e8622d18b3be53ca440928d96e73bac3d
lib/caputils: split to multiple functions, add test

Let's split the code to make it possible to test separately bsearch as
well as procfs based cap_last_cap().

 $ ./test_caputils --last-by-bsearch
 last cap: 39
 $ ./test_caputils --last-by-procfs
 last cap: 39
 $ ./test_caputils --last
 last cap: 39

Signed-off-by: Karel Zak <kzak@redhat.com>
lib/Makemodule.am
lib/caputils.c