diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-07-24 12:13:30 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2008-07-24 12:13:30 -0400 |
commit | 9864c90760e7c0f287cc616d5f71a674efbbc5ea (patch) | |
tree | d26b1f1c7a9777618070a99f41c824db79465f0c /btrfsctl.c | |
parent | cbfe93f68fb47513386bca429e35e6265091bd86 (diff) |
Print the version string in a few programs
Diffstat (limited to 'btrfsctl.c')
-rw-r--r-- | btrfsctl.c | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -32,6 +32,7 @@ #include "ctree.h" #include "transaction.h" #include "utils.h" +#include "version.h" #ifdef __CHECKER__ #define BLKGETSIZE64 0 @@ -52,6 +53,7 @@ void print_usage(void) printf("\t-A device scans the device for a Btrfs filesystem\n"); printf("\t-a scans all devices for Btrfs filesystems\n"); printf("\t-c forces a single FS sync\n"); + printf("%s\n", BTRFS_BUILD_VERSION); exit(1); } @@ -157,7 +159,15 @@ int main(int ac, char **av) perror("ioctl:"); exit(1); } - printf("ioctl returns %d\n", ret); - return 0; + if (ret == 0) { + printf("operation complete\n"); + } else { + printf("ioctl failed with error %d\n", ret); + } + printf("%s\n", BTRFS_BUILD_VERSION); + if (ret) + exit(0); + else + exit(1); } |