mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-02-23 00:00:02 +03:00
Allow multiple targets for subvolume delete.
Signed-off-by: Malte Schröder <malte.schroeder@tnxip.de> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
2541755981
commit
cb8dc1b2ba
@ -24,7 +24,7 @@ enum Subcommands {
|
|||||||
#[command(visible_aliases = ["del"])]
|
#[command(visible_aliases = ["del"])]
|
||||||
Delete {
|
Delete {
|
||||||
/// Path
|
/// Path
|
||||||
target: PathBuf,
|
targets: Vec<PathBuf>,
|
||||||
},
|
},
|
||||||
|
|
||||||
#[command(allow_missing_positional = true, visible_aliases = ["snap"])]
|
#[command(allow_missing_positional = true, visible_aliases = ["snap"])]
|
||||||
@ -58,7 +58,8 @@ pub fn subvolume(argv: Vec<String>) -> Result<()> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Subcommands::Delete { target } => {
|
Subcommands::Delete { targets } => {
|
||||||
|
for target in targets {
|
||||||
let target = target
|
let target = target
|
||||||
.canonicalize()
|
.canonicalize()
|
||||||
.context("subvolume path does not exist or can not be canonicalized")?;
|
.context("subvolume path does not exist or can not be canonicalized")?;
|
||||||
@ -69,6 +70,7 @@ pub fn subvolume(argv: Vec<String>) -> Result<()> {
|
|||||||
.context("Failed to delete the subvolume")?;
|
.context("Failed to delete the subvolume")?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Subcommands::Snapshot {
|
Subcommands::Snapshot {
|
||||||
read_only,
|
read_only,
|
||||||
source,
|
source,
|
||||||
|
Loading…
Reference in New Issue
Block a user