exit(1);
}
+static void print_version(void)
+{
+ fprintf(stderr, "mkfs.btrfs, part of %s\n", BTRFS_BUILD_VERSION);
+ exit(0);
+}
+
static u64 parse_profile(char *s)
{
if (strcmp(s, "raid0") == 0) {
{ "nodesize", 1, NULL, 'n' },
{ "sectorsize", 1, NULL, 's' },
{ "data", 1, NULL, 'd' },
+ { "version", 0, NULL, 'V' },
{ 0, 0, 0, 0}
};
while(1) {
int c;
- c = getopt_long(ac, av, "A:b:l:n:s:m:d:L:", long_options,
+ c = getopt_long(ac, av, "A:b:l:n:s:m:d:L:V", long_options,
&option_index);
if (c < 0)
break;
}
zero_end = 0;
break;
+ case 'V':
+ print_version();
+ break;
default:
print_usage();
}