Skip to content

Commit

Permalink
btrfs-progs: image: 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.

  $ btrfs-image --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 65ad4e4 commit 0df367a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Documentation/btrfs-image.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ OPTIONS
-m
Restore for multiple devices, more than 1 device should be provided.

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

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

Expand Down
4 changes: 2 additions & 2 deletions image/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ static const char * const image_usage[] = {
OPTLINE("-d", "also dump data, conflicts with -w"),
"",
"General:",
OPTLINE("--version", "print the btrfs-image version and exit"),
OPTLINE("--version", "print the btrfs-image version, builtin featurues and exit"),
OPTLINE("--help", "print this help and exit"),
"",
"In the dump mode, source is the btrfs device and target is the output file (use '-' for stdout).",
Expand Down Expand Up @@ -140,7 +140,7 @@ int BOX_MAIN(image)(int argc, char *argv[])
dump_data = true;
break;
case GETOPT_VAL_VERSION:
printf("btrfs-image, part of %s\n", PACKAGE_STRING);
help_builtin_features("btrfs-image, part of ");
ret = 0;
goto success;
case GETOPT_VAL_HELP:
Expand Down

0 comments on commit 0df367a

Please sign in to comment.