Skip to content

Commit

Permalink
btrfs-progs: tune: print builtin features in --version output
Browse files Browse the repository at this point in the history
For parity with 'btrfs', also print the builtin features.

  $ btrfstune --version
  btrfs-image, part of btrfs-progs v6.12
  +EXPERIMENTAL -INJECT -STATIC +LZO +ZSTD +UDEV +FSVERITY +ZONED CRYPTO=builtin

Signed-off-by: David Sterba <[email protected]>
  • Loading branch information
kdave committed Feb 11, 2025
1 parent 0df367a commit ffe019e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Documentation/btrfstune.rst
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ OPTIONS
completely switch the entire filesystem, run a full balance of the
metadata. Please refer to :doc:`btrfs-balance`.

--version
Print the :command:`btrfstune` version, builtin features and exit.


EXIT STATUS
-----------
Expand Down
4 changes: 2 additions & 2 deletions tune/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ static const char * const tune_usage[] = {
"",
"General:",
OPTLINE("-f", "allow dangerous operations, make sure that you are aware of the dangers"),
OPTLINE("--version", "print the btrfstune version and exit"),
OPTLINE("--version", "print the btrfstune version, builtin features and exit"),
OPTLINE("--help", "print this help and exit"),
#if EXPERIMENTAL
"",
Expand Down Expand Up @@ -309,7 +309,7 @@ int BOX_MAIN(btrfstune)(int argc, char *argv[])
break;
#endif
case GETOPT_VAL_VERSION:
printf("btrfstune, part of %s\n", PACKAGE_STRING);
help_builtin_features("btrfstune, part of ");
ret = 0;
goto free_out;
case GETOPT_VAL_HELP:
Expand Down

0 comments on commit ffe019e

Please sign in to comment.