@@ -3477,6 +3477,12 @@ static void print_usage(void)
exit(1);
}
+static void print_info(void)
+{
+ fprintf(stderr, "%s\n", BTRFS_BUILD_VERSION);
+ exit(0);
+}
+
static struct option long_options[] = {
{ "super", 1, NULL, 's' },
{ "repair", 0, NULL, 0 },
@@ -3501,7 +3507,7 @@ int main(int ac, char **av)
while(1) {
int c;
- c = getopt_long(ac, av, "s:", long_options,
+ c = getopt_long(ac, av, "s:anry", long_options,
&option_index);
if (c < 0)
break;
@@ -3514,6 +3520,12 @@ int main(int ac, char **av)
break;
case '?':
print_usage();
+ break;
+ case 'a':
+ case 'n':
+ case 'r':
+ case 'y':
+ print_info();
}
if (option_index == 1) {
printf("enabling repair mode\n");