btrfs-progs: properly test for send_stream_version

We want to notrun if this test fails, not if it succeeds.  Additionally
we want -s, as -q will still print an error if it gets ENOENT from the
file we're trying to grep.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Josef Bacik 2022-10-25 15:49:56 -04:00 committed by David Sterba
parent 8bc13b39aa
commit 584b3e1d55
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ check_prereq btrfs
setup_root_helper
prepare_test_dev
if grep -q '1$' "/sys/fs/btrfs/features/send_stream_version"; then
if ! grep -s '1$' "/sys/fs/btrfs/features/send_stream_version"; then
_not_run "kernel does not support send stream >1"
exit
fi