mirror of
https://github.com/kdave/btrfs-progs
synced 2025-02-16 09:46:55 +00:00
btrfs-progs: tests: use feature output from "btrfs --version"
With the new feature description output in "btrfs --version" there is no need to do the config.h hack to determine if we have certain feature. This provides a more reliable way to detect features. Signed-off-by: Qu Wenruo <wqu@suse.com>
This commit is contained in:
parent
fdbab93ca5
commit
c5ee9301c6
@ -12,11 +12,7 @@ _test_config()
|
|||||||
{
|
{
|
||||||
local feature="$1"
|
local feature="$1"
|
||||||
|
|
||||||
if [ ! -f "$TOP/include/config.h" ]; then
|
if "$TOP/btrfs" --version | grep -q "+${feature}"; then
|
||||||
echo "include/config.h not exists"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
if grep -q "$feature.*1" "${TOP}/include/config.h"; then
|
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
return 1
|
return 1
|
||||||
|
Loading…
Reference in New Issue
Block a user