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>
This commit is contained in:
Integral 2025-03-27 14:37:19 +08:00 committed by Kent Overstreet
parent 19d3a1778c
commit 3bfe433d22

View File

@ -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>,
},