]> git.proxmox.com Git - proxmox-backup.git/blobdiff - src/bin/pxar.rs
src/pxar/encoder.rs: allow to pass list of devices
[proxmox-backup.git] / src / bin / pxar.rs
index 360e982d3bd10f0c1962580455d67358b1a6f58c..3f5aa535e3048e40467bda9b25f628433c4d2fe7 100644 (file)
@@ -15,6 +15,7 @@ use std::fs::OpenOptions;
 use std::sync::Arc;
 use std::os::unix::fs::OpenOptionsExt;
 use std::os::unix::io::AsRawFd;
+use std::collections::HashSet;
 
 use proxmox_backup::pxar;
 
@@ -155,6 +156,8 @@ fn create_archive(
     let no_fcaps = param["no-fcaps"].as_bool().unwrap_or(false);
     let no_acls = param["no-acls"].as_bool().unwrap_or(false);
 
+    let devices = if all_file_systems { None } else { Some(HashSet::new()) };
+
     let source = PathBuf::from(source);
 
     let mut dir = nix::dir::Dir::open(
@@ -178,7 +181,7 @@ fn create_archive(
         feature_flags ^= pxar::CA_FORMAT_WITH_ACL;
     }
 
-    pxar::Encoder::encode(source, &mut dir, &mut writer, all_file_systems, verbose, feature_flags)?;
+    pxar::Encoder::encode(source, &mut dir, &mut writer, devices, verbose, feature_flags)?;
 
     writer.flush()?;