Skip to content

Commit

Permalink
btrfs-progs: convert: 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, although not
all of them are relevant.

  $ btrfs-convert --version
  btrfs-convert, 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 2e118b1 commit 65ad4e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Documentation/btrfs-convert.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ OPTIONS
* *copy* - copy UUID from the source filesystem
* *UUID* - a conforming UUID value, the 36 byte string representation

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

EXIT STATUS
-----------

Expand Down
4 changes: 2 additions & 2 deletions convert/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1869,7 +1869,7 @@ static const char * const convert_usage[] = {
OPTLINE("--no-progress", "show only overview, not the detailed progress"),
"",
"General:",
OPTLINE("--version", "print the btrfs-convert version and exit"),
OPTLINE("--version", "print the btrfs-convert version, builtin features and exit"),
OPTLINE("--help", "print this help and exit"),
"",
"Supported filesystems:",
Expand Down Expand Up @@ -2029,7 +2029,7 @@ int BOX_MAIN(convert)(int argc, char *argv[])
}
break;
case GETOPT_VAL_VERSION:
printf("btrfs-convert, part of %s\n", PACKAGE_STRING);
help_builtin_features("btrfs-convert, part of ");
ret = 0;
goto success;
case GETOPT_VAL_HELP:
Expand Down

0 comments on commit 65ad4e4

Please sign in to comment.