From 9864c90760e7c0f287cc616d5f71a674efbbc5ea Mon Sep 17 00:00:00 2001 From: Chris Mason Date: Thu, 24 Jul 2008 12:13:30 -0400 Subject: Print the version string in a few programs --- btrfsctl.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'btrfsctl.c') diff --git a/btrfsctl.c b/btrfsctl.c index 7e7e79b5..0cdf2726 100644 --- a/btrfsctl.c +++ b/btrfsctl.c @@ -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); } -- cgit v1.2.3