public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] btrfs-progs: subvolme: remove unused options for create and snapshot
@ 2022-03-09  8:14 Sidong Yang
  2022-03-09  8:14 ` [PATCH 2/2] btrfs-progs: qgroup: remove unused btrfs_qgroup_inherit_add_group() Sidong Yang
  2022-03-09  8:52 ` [PATCH 1/2] btrfs-progs: subvolme: remove unused options for create and snapshot Qu Wenruo
  0 siblings, 2 replies; 6+ messages in thread
From: Sidong Yang @ 2022-03-09  8:14 UTC (permalink / raw)
  To: linux-btrfs, Qu Wenruo; +Cc: Sidong Yang

There are options '-c' in create subvolume and '-c' and '-x' in
snapshot. And the codes about them is there, but not in the manual or
help. This codes should be removed to avoid confusion.

Signed-off-by: Sidong Yang <realwakka@gmail.com>
---
 cmds/subvolume.c | 25 ++-----------------------
 1 file changed, 2 insertions(+), 23 deletions(-)

diff --git a/cmds/subvolume.c b/cmds/subvolume.c
index fbf56566..408aebee 100644
--- a/cmds/subvolume.c
+++ b/cmds/subvolume.c
@@ -108,18 +108,11 @@ static int cmd_subvol_create(const struct cmd_struct *cmd,
 
 	optind = 0;
 	while (1) {
-		int c = getopt(argc, argv, "c:i:");
+		int c = getopt(argc, argv, "i:");
 		if (c < 0)
 			break;
 
 		switch (c) {
-		case 'c':
-			res = btrfs_qgroup_inherit_add_copy(&inherit, optarg, 0);
-			if (res) {
-				retval = res;
-				goto out;
-			}
-			break;
 		case 'i':
 			res = btrfs_qgroup_inherit_add_group(&inherit, optarg);
 			if (res) {
@@ -541,18 +534,11 @@ static int cmd_subvol_snapshot(const struct cmd_struct *cmd,
 	memset(&args, 0, sizeof(args));
 	optind = 0;
 	while (1) {
-		int c = getopt(argc, argv, "c:i:r");
+		int c = getopt(argc, argv, "i:r");
 		if (c < 0)
 			break;
 
 		switch (c) {
-		case 'c':
-			res = btrfs_qgroup_inherit_add_copy(&inherit, optarg, 0);
-			if (res) {
-				retval = res;
-				goto out;
-			}
-			break;
 		case 'i':
 			res = btrfs_qgroup_inherit_add_group(&inherit, optarg);
 			if (res) {
@@ -563,13 +549,6 @@ static int cmd_subvol_snapshot(const struct cmd_struct *cmd,
 		case 'r':
 			readonly = 1;
 			break;
-		case 'x':
-			res = btrfs_qgroup_inherit_add_copy(&inherit, optarg, 1);
-			if (res) {
-				retval = res;
-				goto out;
-			}
-			break;
 		default:
 			usage_unknown_option(cmd, argv);
 		}
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-03-09 15:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-09  8:14 [PATCH 1/2] btrfs-progs: subvolme: remove unused options for create and snapshot Sidong Yang
2022-03-09  8:14 ` [PATCH 2/2] btrfs-progs: qgroup: remove unused btrfs_qgroup_inherit_add_group() Sidong Yang
2022-03-09  8:52 ` [PATCH 1/2] btrfs-progs: subvolme: remove unused options for create and snapshot Qu Wenruo
2022-03-09 13:17   ` Sidong Yang
2022-03-09 13:25     ` Qu Wenruo
2022-03-09 15:05       ` Sidong Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox