summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIntegral <integral@archlinuxcn.org>2025-03-27 14:37:19 +0800
committerKent Overstreet <kent.overstreet@linux.dev>2025-03-27 13:58:21 -0400
commit3bfe433d22b4f1800f45e459defbad9b477e1af6 (patch)
treee09991dc0b174ead84892a211840fcec5bbf7ef6 /src
parent19d3a1778cb6014f776d26b37738610c90c893fd (diff)
bcachefs-tools: make targets of subvolume create/delete required
Currently, when no targets are provided for "bcachefs subvolume create" or "bcachefs subvolume delete", it will exit silently with code 0. Make targets (arguments) required to solve this problem. This patch solves issue https://github.com/koverstreet/bcachefs/issues/766. Signed-off-by: Integral <integral@archlinuxcn.org> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'src')
-rw-r--r--src/commands/subvolume.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/commands/subvolume.rs b/src/commands/subvolume.rs
index 7df20819..6f5f2f2b 100644
--- a/src/commands/subvolume.rs
+++ b/src/commands/subvolume.rs
@@ -18,12 +18,14 @@ enum Subcommands {
#[command(visible_aliases = ["new"])]
Create {
/// Paths
+ #[arg(required = true)]
targets: Vec<PathBuf>,
},
#[command(visible_aliases = ["del"])]
Delete {
/// Path
+ #[arg(required = true)]
targets: Vec<PathBuf>,
},