[pbs-devel] [PATCH proxmox-backup 06/23] add helper for checking if a removable datastore is available
Lukas Wagner
l.wagner at proxmox.com
Tue Sep 19 15:38:07 CEST 2023
On 9/15/23 08:54, Hannes Laimer wrote:
> +pub fn check_if_available(config: &DataStoreConfig) -> Result<(), Error> {
> + config.backing_device.as_ref().map_or(Ok(()), |uuid| {
> + let mut command = std::process::Command::new("findmnt");
> + command.args(["-n", "-o", "TARGET", "--source", &format!("UUID={}", uuid)]);
nit: uuid can be written inside placeholder: {uuid}
--
- Lukas
More information about the pbs-devel
mailing list