Skip to contentSkip to conversation

bcachefs-tools: make targets of subvolume create/delete required

PATCH RESEND Applied Integral 2 participants 2 messages Mar 27, 2025

lore
Share & tools
lore

Integral

author
#0 lore raw

PATCH RESEND 1/1 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.

---
 src/commands/subvolume.rs | 2 ++
 1 file changed, 2 insertions(+)
src/commands/subvolume.rs +2 -0
index 7df20819..6f5f2f2b 100644
@@ -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>,
     },
 
Signature · 1 line
2.49.0
#1 lore raw
Quoted 7 lines · Integral

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.

Thanks, applied

Quoted 26 lines
---
 src/commands/subvolume.rs | 2 ++
 1 file changed, 2 insertions(+)
src/commands/subvolume.rs +2 -0
index 7df20819..6f5f2f2b 100644
@@ -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>,
     },
 
Signature · 1 line
2.49.0