Skip to contentSkip to conversation

btrfs-progs: document force option in mkfs usage(); add long opt

PATCH New Eric Sandeen 1 participant 1 message Mar 13, 2013 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 btrfs-progs: document force option in mkfs usage(); add long opt

I missed updating the mkfs.btrfs usage() when I added the option to force fs overwrite.

Update that, and while we're at it add a long option, since all other commands have long counterparts.

---

man/mkfs.btrfs.8.in +1 -1
index 41163e0..531e00a 100644
@@ -39,7 +39,7 @@ mkfs.btrfs uses all the available storage for the filesystem.
 Specify how the data must be spanned across the devices specified. Valid
 values are raid0, raid1, raid10 or single.
 .TP
-\fB\-f\fR
+\fB\-f\fR, \fB\-\-force\fR
 Force overwrite when an existing filesystem is detected on the device.
 By default, mkfs.btrfs will not write to the device if it suspects that 
 there is a filesystem or partition table on the device already.
mkfs.c +2 -0
index be13667..52ae511 100644
@@ -327,6 +327,7 @@ static void print_usage(void)
 	fprintf(stderr, "\t -A --alloc-start the offset to start the FS\n");
 	fprintf(stderr, "\t -b --byte-count total number of bytes in the FS\n");
 	fprintf(stderr, "\t -d --data data profile, raid0, raid1, raid10, dup or single\n");
+	fprintf(stderr, "\t -f --force force overwrite of existing filesystem\n");
 	fprintf(stderr, "\t -l --leafsize size of btree leaves\n");
 	fprintf(stderr, "\t -L --label set a label\n");
 	fprintf(stderr, "\t -m --metadata metadata profile, values like data profile\n");
@@ -385,6 +386,7 @@ static char *parse_label(char *input)
 static struct option long_options[] = {
 	{ "alloc-start", 1, NULL, 'A'},
 	{ "byte-count", 1, NULL, 'b' },
+	{ "force", 0, NULL, 'f' },
 	{ "leafsize", 1, NULL, 'l' },
 	{ "label", 1, NULL, 'L'},
 	{ "metadata", 1, NULL, 'm' },