File 0179-btrfs-progs-mkfs-rename-T-to-K.patch of Package btrfsprogs

From b6f17f9e5c87b93cd887088121551839d2f24b35 Mon Sep 17 00:00:00 2001
From: David Sterba <dsterba@suse.cz>
Date: Mon, 26 Mar 2012 14:50:02 +0200
Subject: [PATCH 7/8] btrfs-progs: mkfs: rename -T to -K

Fixup to "mkfs: allow not to trim a device", to match mkfs.xfs option
name.

Signed-off-by: David Sterba <dsterba@suse.cz>
---
 man/mkfs.btrfs.8.in |    4 ++--
 mkfs.c              |    8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/man/mkfs.btrfs.8.in b/man/mkfs.btrfs.8.in
index 307d1fb..71f061d 100644
--- a/man/mkfs.btrfs.8.in
+++ b/man/mkfs.btrfs.8.in
@@ -14,7 +14,7 @@ mkfs.btrfs \- create an btrfs filesystem
 [ \fB\-n\fP\fI nodesize\fP ]
 [ \fB\-s\fP\fI sectorsize\fP ]
 [ \fB\-r\fP\fI rootdir\fP ]
-[ \fB\-T\fP ]
+[ \fB\-K\fP ]
 [ \fB\-h\fP ]
 [ \fB\-V\fP ] \fI device\fP [ \fI device ...\fP ]
 .SH DESCRIPTION
@@ -67,7 +67,7 @@ Specify the sectorsize, the minimum block allocation.
 \fB\-r\fR, \fB\-\-rootdir \fIrootdir\fR
 Specify a directory to copy into the newly created fs.
 .TP
-\fB\-T\fR, \fB\-\-nodiscard \fR
+\fB\-K\fR, \fB\-\-nodiscard \fR
 Do not perform whole device TRIM operation by default.
 .TP
 \fB\-V\fR, \fB\-\-version\fR
diff --git a/mkfs.c b/mkfs.c
index cf571c4..d17f71c 100644
--- a/mkfs.c
+++ b/mkfs.c
@@ -344,7 +344,7 @@ static void print_usage(void)
 	fprintf(stderr, "\t -n --nodesize size of btree nodes\n");
 	fprintf(stderr, "\t -s --sectorsize min block allocation\n");
 	fprintf(stderr, "\t -r --rootdir the source directory\n");
-	fprintf(stderr, "\t -T --nodiscard do not perform whole device TRIM\n");
+	fprintf(stderr, "\t -K --nodiscard do not perform whole device TRIM\n");
 	fprintf(stderr, "%s\n", BTRFS_BUILD_VERSION);
 	exit(1);
 }
@@ -407,7 +407,7 @@ static struct option long_options[] = {
 	{ "version", 0, NULL, 'V' },
 	{ "rootdir", 1, NULL, 'r' },
 	{ "force", 0, NULL, 'f' },
-	{ "nodiscard", 0, NULL, 'T' },
+	{ "nodiscard", 0, NULL, 'K' },
 	{ 0, 0, 0, 0}
 };
 
@@ -1236,7 +1236,7 @@ int main(int ac, char **av)
 
 	while(1) {
 		int c;
-		c = getopt_long(ac, av, "A:b:l:n:s:m:d:L:r:VMfT", long_options,
+		c = getopt_long(ac, av, "A:b:l:n:s:m:d:L:r:VMfK", long_options,
 				&option_index);
 		if (c < 0)
 			break;
@@ -1285,7 +1285,7 @@ int main(int ac, char **av)
 			case 'f':
 				force=1;
 				break;
-			case 'T':
+			case 'K':
 				nodiscard=1;
 				break;
 			default:
-- 
1.7.6.233.gd79bc

openSUSE Build Service is sponsored by